summaryrefslogtreecommitdiff
path: root/lib/Support/Dwarf.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-09-20 00:33:15 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-09-20 00:33:15 +0000
commitac3f016599ac50a4777b0348c43892c041ef489b (patch)
tree8f9e4640de972fee884bbacce3f5831bb1989da9 /lib/Support/Dwarf.cpp
parentc2286720de4f665dc2750d54c3748d331f81e105 (diff)
downloadllvm-ac3f016599ac50a4777b0348c43892c041ef489b.tar.gz
llvm-ac3f016599ac50a4777b0348c43892c041ef489b.tar.bz2
llvm-ac3f016599ac50a4777b0348c43892c041ef489b.tar.xz
DebugInfo: GDBIndexEntry*String conversion functions now return const char* for easy llvm::formating
This was previously invoking UB by passing a user-defined type to format. Thanks to Jordan Rose for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Dwarf.cpp')
-rw-r--r--lib/Support/Dwarf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/Dwarf.cpp b/lib/Support/Dwarf.cpp
index 0e64035c0b..f4993454b6 100644
--- a/lib/Support/Dwarf.cpp
+++ b/lib/Support/Dwarf.cpp
@@ -742,7 +742,7 @@ const char *llvm::dwarf::AtomTypeString(unsigned AT) {
return 0;
}
-StringRef llvm::dwarf::GDBIndexEntryKindString(GDBIndexEntryKind Kind) {
+const char *llvm::dwarf::GDBIndexEntryKindString(GDBIndexEntryKind Kind) {
switch (Kind) {
case GIEK_NONE:
return "NONE";
@@ -764,7 +764,7 @@ StringRef llvm::dwarf::GDBIndexEntryKindString(GDBIndexEntryKind Kind) {
llvm_unreachable("Unknown GDBIndexEntryKind value");
}
-StringRef llvm::dwarf::GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage) {
+const char *llvm::dwarf::GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage) {
switch (Linkage) {
case GIEL_EXTERNAL:
return "EXTERNAL";