[LLVMdev] Compilation Failure

Bill Wendling isanbard at gmail.com
Tue Sep 25 10:45:59 PDT 2007


On 9/25/07, Daniel Berlin <dberlin at dberlin.org> wrote:
> On 9/24/07, Bill Wendling <isanbard at gmail.com> wrote:
> > On Sep 24, 2007, at 3:15 PM, Dale Johannesen wrote:
> >
> > Weird. I see a potential problem, though. The code is like this:
> >
> > void dumpToDOUT(SparseBitVector<> *bitmap) {
> >    dump(*bitmap, DOUT);
> > }
> >
> > where dump expects an llvm::OStream& for the second argument.
> > However, when NDEBUG is #defined, DOUT is "llvm::OStream(0)", so it
> > can't be passed by reference.
> What compiler are you compiling with?
> I build release and debug builds on darwin (and run the testsuite)
> before i check in my changes :).
>
I'm just using GCC, though it's on Leopard. I'm not sure if they have
a fix to catch this type of code.

> You can feel free to remove the function, it is simply a GDB helper :)
>
I just put it inside #ifdef's, so it now works. :-)

-bw



More information about the llvm-dev mailing list