summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Support/Dwarf.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
committerpatrick <patrick@openbsd.org>2017-01-14 19:55:43 +0000
commitbd3306aecb3a15e8967143b8cdbbccf2b1b19b74 (patch)
tree309a8132b44564b9e634c0da6815187ce8eab27c /gnu/llvm/lib/Support/Dwarf.cpp
parentkillp -a should not kill the window if only one pane. (diff)
downloadwireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.tar.xz
wireguard-openbsd-bd3306aecb3a15e8967143b8cdbbccf2b1b19b74.zip
Import LLVM 3.9.1 including clang and lld.
Diffstat (limited to 'gnu/llvm/lib/Support/Dwarf.cpp')
-rw-r--r--gnu/llvm/lib/Support/Dwarf.cpp37
1 files changed, 21 insertions, 16 deletions
diff --git a/gnu/llvm/lib/Support/Dwarf.cpp b/gnu/llvm/lib/Support/Dwarf.cpp
index 7d722567173..7aea05d7701 100644
--- a/gnu/llvm/lib/Support/Dwarf.cpp
+++ b/gnu/llvm/lib/Support/Dwarf.cpp
@@ -384,23 +384,22 @@ const char *llvm::dwarf::CaseString(unsigned Case) {
return nullptr;
}
-const char *llvm::dwarf::ConventionString(unsigned Convention) {
- switch (Convention) {
- case DW_CC_normal: return "DW_CC_normal";
- case DW_CC_program: return "DW_CC_program";
- case DW_CC_nocall: return "DW_CC_nocall";
- case DW_CC_lo_user: return "DW_CC_lo_user";
- case DW_CC_hi_user: return "DW_CC_hi_user";
- case DW_CC_GNU_borland_fastcall_i386: return "DW_CC_GNU_borland_fastcall_i386";
- case DW_CC_BORLAND_safecall: return "DW_CC_BORLAND_safecall";
- case DW_CC_BORLAND_stdcall: return "DW_CC_BORLAND_stdcall";
- case DW_CC_BORLAND_pascal: return "DW_CC_BORLAND_pascal";
- case DW_CC_BORLAND_msfastcall: return "DW_CC_BORLAND_msfastcall";
- case DW_CC_BORLAND_msreturn: return "DW_CC_BORLAND_msreturn";
- case DW_CC_BORLAND_thiscall: return "DW_CC_BORLAND_thiscall";
- case DW_CC_BORLAND_fastcall: return "DW_CC_BORLAND_fastcall";
+const char *llvm::dwarf::ConventionString(unsigned CC) {
+ switch (CC) {
+ default:
+ return nullptr;
+#define HANDLE_DW_CC(ID, NAME) \
+ case DW_CC_##NAME: \
+ return "DW_CC_" #NAME;
+#include "llvm/Support/Dwarf.def"
}
- return nullptr;
+}
+
+unsigned llvm::dwarf::getCallingConvention(StringRef CCString) {
+ return StringSwitch<unsigned>(CCString)
+#define HANDLE_DW_CC(ID, NAME) .Case("DW_CC_" #NAME, DW_CC_##NAME)
+#include "llvm/Support/Dwarf.def"
+ .Default(0);
}
const char *llvm::dwarf::InlineCodeString(unsigned Code) {
@@ -546,6 +545,12 @@ const char *llvm::dwarf::ApplePropertyString(unsigned Prop) {
return "DW_APPLE_PROPERTY_strong";
case DW_APPLE_PROPERTY_unsafe_unretained:
return "DW_APPLE_PROPERTY_unsafe_unretained";
+ case DW_APPLE_PROPERTY_nullability:
+ return "DW_APPLE_PROPERTY_nullability";
+ case DW_APPLE_PROPERTY_null_resettable:
+ return "DW_APPLE_PROPERTY_null_resettable";
+ case DW_APPLE_PROPERTY_class:
+ return "DW_APPLE_PROPERTY_class";
}
return nullptr;
}