Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.
And yes, this time, I started from a clean build directory, and
all the tests passed. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 72ec584..c0df55b 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -90,10 +90,13 @@
}
void CodeGenModule::createCXXABI() {
- if (Context.Target.getCXXABI() == "microsoft")
- ABI = CreateMicrosoftCXXABI(*this);
- else
+ switch (Context.Target.getCXXABI()) {
+ default:
ABI = CreateItaniumCXXABI(*this);
+ break;
+ case CXXABI_Microsoft:
+ ABI = CreateMicrosoftCXXABI(*this);
+ }
}
void CodeGenModule::Release() {