Index: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h =================================================================== --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h @@ -32,7 +32,7 @@ /// The name of the object as given by the DW_AT_name attribute of the /// referenced DIE. - const char *Name; + StringRef Name; }; /// Each table consists of sets of variable length entries. Each set describes Index: llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp =================================================================== --- llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp @@ -37,7 +37,7 @@ if (DieRef == 0) break; uint8_t IndexEntryValue = GnuStyle ? PubNames.getU8(&Offset) : 0; - const char *Name = PubNames.getCStr(&Offset); + StringRef Name = PubNames.getCStrRef(&Offset); SetData.Entries.push_back( {DieRef, PubIndexEntryDescriptor(IndexEntryValue), Name}); }