diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:05:00 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:05:00 +0000 |
commit | 3b631d291efec2b8b1ef2f20d63e2b31d2bd8254 (patch) | |
tree | 447e20d6c627163d127bf17419675b2afa0e62aa /llvm/lib/Support/Dwarf.cpp | |
parent | 8f46ee61c10d57a95d565629c7b81250d6dba3bb (diff) | |
download | llvm-3b631d291efec2b8b1ef2f20d63e2b31d2bd8254.zip llvm-3b631d291efec2b8b1ef2f20d63e2b31d2bd8254.tar.gz llvm-3b631d291efec2b8b1ef2f20d63e2b31d2bd8254.tar.bz2 |
Support: Add dwarf::getOperationEncoding()
llvm-svn: 229001
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 a2bd6cb..95c4bc3 100644 --- a/llvm/lib/Support/Dwarf.cpp +++ b/llvm/lib/Support/Dwarf.cpp @@ -247,6 +247,13 @@ const char *llvm::dwarf::OperationEncodingString(unsigned Encoding) { } } +unsigned llvm::dwarf::getOperationEncoding(StringRef OperationEncodingString) { + return StringSwitch<unsigned>(OperationEncodingString) +#define HANDLE_DW_OP(ID, NAME) .Case("DW_OP_" #NAME, DW_OP_##NAME) +#include "llvm/Support/Dwarf.def" + .Default(0); +} + const char *llvm::dwarf::AttributeEncodingString(unsigned Encoding) { switch (Encoding) { default: return nullptr; |