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`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228473 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-07 00:36:23 +00:00
parent e29c334dd4
commit a496490358
4 changed files with 35 additions and 9 deletions

View File

@@ -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) {