From 6bcb07ad7152237597f2bd1cde4d6a3075e8ac0c 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. :) llvm-svn: 111507 --- clang/lib/CodeGen/CodeGenModule.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen') 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() { -- cgit v1.2.3