aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2010-08-19 02:18:14 +0000
committerCharles Davis <cdavis@mines.edu>2010-08-19 02:18:14 +0000
commit20cf717034ba1f20fc47c025ecb72ed9b631ad13 (patch)
tree5465f2c82f0d3caf0bce2ffe9db91be515f3a73a /lib/CodeGen/CodeGenModule.cpp
parent671947b18dba342f9aba022ee992babef325a833 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 72ec584f6c..c0df55b808 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -90,10 +90,13 @@ void CodeGenModule::createObjCRuntime() {
}
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() {