diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-06 23:46:49 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-06 23:46:49 +0000 |
commit | e07f13ae35e82e5579d0d9f0dc05fd0321c6bba2 (patch) | |
tree | 256213d48956796e26fe843e1791e4555f3d7366 /llvm/lib/Support/Dwarf.cpp | |
parent | dd563dd3415d6cf9028d5cf36db273ef86434a8e (diff) | |
download | bcm5719-llvm-e07f13ae35e82e5579d0d9f0dc05fd0321c6bba2.tar.gz bcm5719-llvm-e07f13ae35e82e5579d0d9f0dc05fd0321c6bba2.zip |
Support: Add dwarf::getAttributeEncoding()
llvm-svn: 228470
Diffstat (limited to 'llvm/lib/Support/Dwarf.cpp')
-rw-r--r-- | llvm/lib/Support/Dwarf.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp index 553a436938b..af6db59302c 100644 --- a/llvm/lib/Support/Dwarf.cpp +++ b/llvm/lib/Support/Dwarf.cpp @@ -414,6 +414,13 @@ const char *llvm::dwarf::AttributeEncodingString(unsigned Encoding) { } } +unsigned llvm::dwarf::getAttributeEncoding(StringRef EncodingString) { + return StringSwitch<unsigned>(EncodingString) +#define HANDLE_DW_ATE(ID, NAME) .Case("DW_ATE_" #NAME, DW_ATE_##NAME) +#include "llvm/Support/Dwarf.def" + .Default(0); +} + const char *llvm::dwarf::DecimalSignString(unsigned Sign) { switch (Sign) { case DW_DS_unsigned: return "DW_DS_unsigned"; |