summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp6
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 90abd439b12..880d5372bf0 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -86,8 +86,10 @@ void CodeGenModule::createObjCRuntime() {
}
void CodeGenModule::createCXXABI() {
- // For now, just create an Itanium ABI.
- ABI = CreateItaniumCXXABI(*this);
+ if (Context.Target.getCXXABI() == "microsoft")
+ ABI = CreateMicrosoftCXXABI(*this);
+ else
+ ABI = CreateItaniumCXXABI(*this);
}
void CodeGenModule::Release() {
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index cf809991de6..d391651fac1 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -124,7 +124,7 @@ void MicrosoftMangleContext::mangleCXXDtor(const CXXDestructorDecl *D,
assert(false && "Can't yet mangle destructors!");
}
-CXXABI *CreateMicrosoftCXXABI(CodeGenModule &CGM) {
+CXXABI *clang::CodeGen::CreateMicrosoftCXXABI(CodeGenModule &CGM) {
return new MicrosoftCXXABI(CGM);
}
OpenPOWER on IntegriCloud