diff options
author | Charles Davis <cdavis@mines.edu> | 2010-08-19 02:18:14 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-08-19 02:18:14 +0000 |
commit | 6bcb07ad7152237597f2bd1cde4d6a3075e8ac0c (patch) | |
tree | 3f987886b301a564df0b45c0df08f2830fcebe0d /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | a0734c5fbd0fbc7ebd7d212aee91690ba99759b0 (diff) | |
download | bcm5719-llvm-6bcb07ad7152237597f2bd1cde4d6a3075e8ac0c.tar.gz bcm5719-llvm-6bcb07ad7152237597f2bd1cde4d6a3075e8ac0c.zip |
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. :)
llvm-svn: 111507
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 72ec584f6c8..c0df55b808d 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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() { |