aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index aaf20ea..93b49ec 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -75,14 +75,19 @@ static llvm::cl::opt<bool> LimitedCoverage(
static const char AnnotationSection[] = "llvm.metadata";
static CGCXXABI *createCXXABI(CodeGenModule &CGM) {
- switch (CGM.getContext().getCXXABIKind()) {
-#define ITANIUM_CXXABI(Name, Str) case TargetCXXABI::Name:
-#define CXXABI(Name, Str)
-#include "clang/Basic/TargetCXXABI.def"
+ switch (CGM.getTarget().getCXXABI().getKind()) {
+ case TargetCXXABI::Fuchsia:
+ case TargetCXXABI::GenericAArch64:
+ case TargetCXXABI::GenericARM:
+ case TargetCXXABI::iOS:
+ case TargetCXXABI::iOS64:
+ case TargetCXXABI::WatchOS:
+ case TargetCXXABI::GenericMIPS:
+ case TargetCXXABI::GenericItanium:
+ case TargetCXXABI::WebAssembly:
+ case TargetCXXABI::XL:
return CreateItaniumCXXABI(CGM);
-#define MICROSOFT_CXXABI(Name, Str) case TargetCXXABI::Name:
-#define CXXABI(Name, Str)
-#include "clang/Basic/TargetCXXABI.def"
+ case TargetCXXABI::Microsoft:
return CreateMicrosoftCXXABI(CGM);
}