[LLVMdev] DEBUG

Dan Gohman gohman at apple.com
Mon Jul 7 11:18:07 PDT 2008


On Jul 7, 2008, at 11:31 AM, Chris Lattner wrote:

> 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?

I just checked, and Debug.h was included in a few .h files,
which I've now fixed.

Dan




More information about the llvm-dev mailing list