summaryrefslogtreecommitdiffstats
path: root/llvm/lib/BinaryFormat/Dwarf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/BinaryFormat/Dwarf.cpp')
-rw-r--r--llvm/lib/BinaryFormat/Dwarf.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 86e3b02577f..593ce7a1965 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -567,6 +567,17 @@ StringRef llvm::dwarf::AttributeValueString(uint16_t Attr, unsigned Val) {
return StringRef();
}
+StringRef llvm::dwarf::IndexString(unsigned Idx) {
+ switch (Idx) {
+ default:
+ return StringRef();
+#define HANDLE_DW_IDX(ID, NAME) \
+ case DW_IDX_##NAME: \
+ return "DW_IDX_" #NAME;
+#include "llvm/BinaryFormat/Dwarf.def"
+ }
+}
+
bool llvm::dwarf::isValidFormForVersion(Form F, unsigned Version,
bool ExtensionsOk) {
if (FormVendor(F) == DWARF_VENDOR_DWARF) {
OpenPOWER on IntegriCloud