From 20cf717034ba1f20fc47c025ecb72ed9b631ad13 Mon Sep 17 00:00:00 2001 From: Charles Davis Date: Thu, 19 Aug 2010 02:18:14 +0000 Subject: 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 --- lib/CodeGen/CodeGenModule.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') 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() { -- cgit v1.2.3-70-g09d2