[cfe-commits] r86915 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Devang Patel dpatel at apple.com
Fri Nov 13 10:22:41 PST 2009


On Nov 13, 2009, at 8:27 AM, Daniel Dunbar wrote:

> On Thu, Nov 12, 2009 at 9:14 AM, Devang Patel <dpatel at apple.com>  
> wrote:
>>
>> On Nov 12, 2009, at 9:04 AM, Daniel Dunbar wrote:
>>
>> First, what's the motivation?
>>
>> To avoid if(Str) check in StringRef constructor, I switched  
>> DebugInfo APIs
>> to not use StringRef.
>
> That part I guessed, however, I'm not sure why this is the right
> approach. Why does the DebugInfo interface need to deal with null
> strings so much?

To handle optional info.

> It seems like that responsibility could be pushed to
> clients, does clang even ever do this? Can you give me a concrete
> example of a specific problem?

     CreateGlobalVariable(DIDescriptor Context, const char * Name,
                          const char * DisplayName,
			 const char * LinkageName,
                          DICompileUnit CompileUnit,
                          unsigned LineNo, DIType Type, bool  
isLocalToUnit,
                          bool isDefinition, llvm::GlobalVariable *GV);


Here LinkageName is optional.
-
Devang



More information about the cfe-commits mailing list