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

Daniel Dunbar daniel at zuster.org
Mon Nov 16 22:55:29 PST 2009


Ok, but why is it hard for clients to pass in an empty string as the
default? That doesn't seem any harder than passing in 0.

 - Daniel

On Fri, Nov 13, 2009 at 10:22 AM, Devang Patel <dpatel at apple.com> wrote:
>
> 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