summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Dwarf.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-07 00:37:15 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-07 00:37:15 +0000
commite7e2abe6a2783be04cb07a82ef0be2565c42cf9d (patch)
tree0f572a88d4a418396b7f1e80889e04ae30156cef /llvm/lib/Support/Dwarf.cpp
parentd6f357421098c8c1a3433d422e87f5b35aeeca29 (diff)
downloadbcm5719-llvm-e7e2abe6a2783be04cb07a82ef0be2565c42cf9d.tar.gz
bcm5719-llvm-e7e2abe6a2783be04cb07a82ef0be2565c42cf9d.zip
Support: Add dwarf::getVirtuality()
llvm-svn: 228474
Diffstat (limited to 'llvm/lib/Support/Dwarf.cpp')
-rw-r--r--llvm/lib/Support/Dwarf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp
index 866d7e55c85..632ce868c5e 100644
--- a/llvm/lib/Support/Dwarf.cpp
+++ b/llvm/lib/Support/Dwarf.cpp
@@ -473,6 +473,14 @@ const char *llvm::dwarf::VirtualityString(unsigned Virtuality) {
}
}
+unsigned llvm::dwarf::getVirtuality(StringRef VirtualityString) {
+ return StringSwitch<unsigned>(VirtualityString)
+#define HANDLE_DW_VIRTUALITY(ID, NAME) \
+ .Case("DW_VIRTUALITY_" #NAME, DW_VIRTUALITY_##NAME)
+#include "llvm/Support/Dwarf.def"
+ .Default(DW_VIRTUALITY_invalid);
+}
+
const char *llvm::dwarf::LanguageString(unsigned Language) {
switch (Language) {
default:
OpenPOWER on IntegriCloud