[LLVMdev] DEBUG

Chris Lattner sabre at nondot.org
Mon Jul 7 11:31:42 PDT 2008


On Mon, 7 Jul 2008, David Greene wrote:
> Some time ago I ran into problems with conflicts because the LLVM DEBUG macro
> and macros defined by our internal software here.  I worked around it but it
> is ugly.
>
> This just came up again today.  The fundamental problem is that two pieces of
> software both use the generic name "DEBUG."  This is just problems waiting
> to happen.  We need some kind of namespace.
>
> Would the LLVM community be open to changing DEBUG to something like
> LLVM_DEBUG?  I am pushing to have our code be changed in a similar way.

Debug.h should only be #included by .cpp files, not .h files.  Are you 
seeing a case where you need to use both debug macros in a .cpp file?

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list