[PATCH] D49046: Use StringRef instead of `const char *`.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 9 15:31:59 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336612: Use StringRef instead of `const char *`. (authored by ruiu, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D49046?vs=154464&id=154715#toc
Repository:
rL LLVM
https://reviews.llvm.org/D49046
Files:
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugPubTable.h
llvm/trunk/lib/DebugInfo/DWARF/DWARFDebugPubTable.cpp
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});
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49046.154715.patch
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180709/564be9ac/attachment.bin>
More information about the llvm-commits
mailing list