diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-09-20 00:33:15 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-09-20 00:33:15 +0000 |
commit | ac3f016599ac50a4777b0348c43892c041ef489b (patch) | |
tree | 8f9e4640de972fee884bbacce3f5831bb1989da9 /include/llvm/Support/Dwarf.h | |
parent | c2286720de4f665dc2750d54c3748d331f81e105 (diff) | |
download | llvm-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 'include/llvm/Support/Dwarf.h')
-rw-r--r-- | include/llvm/Support/Dwarf.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/Support/Dwarf.h b/include/llvm/Support/Dwarf.h index 868669987c..70c46db0e9 100644 --- a/include/llvm/Support/Dwarf.h +++ b/include/llvm/Support/Dwarf.h @@ -17,7 +17,6 @@ #define LLVM_SUPPORT_DWARF_H #include "llvm/Support/DataTypes.h" -#include "llvm/ADT/StringRef.h" namespace llvm { @@ -803,14 +802,14 @@ enum GDBIndexEntryKind { GIEK_UNUSED7 }; -StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind); +const char *GDBIndexEntryKindString(GDBIndexEntryKind Kind); enum GDBIndexEntryLinkage { GIEL_EXTERNAL, GIEL_STATIC }; -StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage); +const char *GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage); /// The gnu_pub* kind looks like: /// |