diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-07 00:36:23 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-07 00:36:23 +0000 |
commit | d6f357421098c8c1a3433d422e87f5b35aeeca29 (patch) | |
tree | 3c1454fa7656d93baff8ebbecb396c7a9f50f991 /llvm/lib/Support/Dwarf.cpp | |
parent | dc494d5303e01c36237de42ec09077b03b58fa88 (diff) | |
download | bcm5719-llvm-d6f357421098c8c1a3433d422e87f5b35aeeca29.tar.gz bcm5719-llvm-d6f357421098c8c1a3433d422e87f5b35aeeca29.zip |
Support: Use Dwarf.def for DW_VIRTUALITY, NFC
Use definition file for `DW_VIRTUALITY_*`. Add a `DW_VIRTUALITY_max`
both for ease of testing and for future use by the `LLParser`.
llvm-svn: 228473
Diffstat (limited to 'llvm/lib/Support/Dwarf.cpp')
-rw-r--r-- | llvm/lib/Support/Dwarf.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Support/Dwarf.cpp b/llvm/lib/Support/Dwarf.cpp index af6db59302c..866d7e55c85 100644 --- a/llvm/lib/Support/Dwarf.cpp +++ b/llvm/lib/Support/Dwarf.cpp @@ -464,11 +464,13 @@ const char *llvm::dwarf::VisibilityString(unsigned Visibility) { const char *llvm::dwarf::VirtualityString(unsigned Virtuality) { switch (Virtuality) { - case DW_VIRTUALITY_none: return "DW_VIRTUALITY_none"; - case DW_VIRTUALITY_virtual: return "DW_VIRTUALITY_virtual"; - case DW_VIRTUALITY_pure_virtual: return "DW_VIRTUALITY_pure_virtual"; + default: + return nullptr; +#define HANDLE_DW_VIRTUALITY(ID, NAME) \ + case DW_VIRTUALITY_##NAME: \ + return "DW_VIRTUALITY_" #NAME; +#include "llvm/Support/Dwarf.def" } - return nullptr; } const char *llvm::dwarf::LanguageString(unsigned Language) { |