[LLVMdev] Compilation Failure

Bill Wendling isanbard at gmail.com
Tue Sep 25 11:40:29 PDT 2007


Hi Dave,

> We ran into a similar problem in our custom code here.  To work around
> it I modified Debug.h like this:
>
> #ifdef NDEBUG
> static llvm::OStream NullStream(0);
> #define DOUT llvm::NullStream
> #else
> #define DOUT llvm::getErrorOutputStream(DEBUG_TYPE)
> #endif
>
I thought about doing this, but there's the potential for naming
conflicts that won't be caught until a release build is done. :-( I
wonder, though. Would it make sense to put the stream decls in their
own namespace (say "namespace stream")? That way we could prevent
naming conflicts and also this bad "gotcha"...

-bw



More information about the llvm-dev mailing list