[llvm-commits] [llvm] r61714 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Evan Cheng echeng at apple.com
Mon Jan 5 14:14:36 PST 2009


On Jan 5, 2009, at 1:40 PM, Devang Patel wrote:

>
> On Jan 5, 2009, at 1:24 PM, Evan Cheng wrote:
>
>>> =
>>> =
>>> ====================================================================
>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Jan  5
>>> 11:57:47 2009
>>> @@ -23,6 +23,7 @@
>>> #include "llvm/CodeGen/MachineModuleInfo.h"
>>> #include "llvm/CodeGen/MachineFrameInfo.h"
>>> #include "llvm/CodeGen/MachineLocation.h"
>>> +#include "llvm/Analysis/DebugInfo.h"
>>> #include "llvm/Support/Debug.h"
>>> #include "llvm/Support/Dwarf.h"
>>> #include "llvm/Support/CommandLine.h"
>>> @@ -1496,6 +1497,49 @@
>>>   }
>>> }
>>>
>>> +  /// ConstructType - Construct basic type die from DIBasicType.
>>> +  void ConstructType(CompileUnit *DW_Unit, DIE &Buffer,
>>> +                     DIBasicType *BTy) {
>>> +
>>> +    // Get core information.
>>> +    const std::string &Name = BTy->getName();
>>
>> This makes a copy of the name string. Is it possible to change
>> AddString, DIEString, etc. to take const char* instead? Then you can
>> use getNameStart() instead.
>
>
> AddString and DIEString takes std::string reference. However,

Those can be changed as well. Or you can overload them?

Evan

>
> DebugInfo::getName() extracts string value from GV on demand where
> there is a possibility to cache extracted strings.
> -
> Devang
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list