From 359b885e12815e8d63adcfb5760696bad82c6908 Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 25 Jan 2013 22:30:49 +0000 Subject: First pass at abstracting out a class for the target C++ ABI. llvm-svn: 173514 --- clang/lib/CodeGen/CodeGenModule.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d5284f8..2da9dba 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -52,10 +52,13 @@ using namespace CodeGen; static const char AnnotationSection[] = "llvm.metadata"; static CGCXXABI &createCXXABI(CodeGenModule &CGM) { - switch (CGM.getContext().getTargetInfo().getCXXABI()) { - case CXXABI_ARM: return *CreateARMCXXABI(CGM); - case CXXABI_Itanium: return *CreateItaniumCXXABI(CGM); - case CXXABI_Microsoft: return *CreateMicrosoftCXXABI(CGM); + switch (CGM.getContext().getTargetInfo().getCXXABI().getKind()) { + // For IR-generation purposes, there's no significant difference + // between the ARM and iOS ABIs. + case TargetCXXABI::GenericARM: return *CreateARMCXXABI(CGM); + case TargetCXXABI::iOS: return *CreateARMCXXABI(CGM); + case TargetCXXABI::GenericItanium: return *CreateItaniumCXXABI(CGM); + case TargetCXXABI::Microsoft: return *CreateMicrosoftCXXABI(CGM); } llvm_unreachable("invalid C++ ABI kind"); -- cgit v1.1