summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-01-25 22:30:49 +0000
committerJohn McCall <rjmccall@apple.com>2013-01-25 22:30:49 +0000
commit359b885e12815e8d63adcfb5760696bad82c6908 (patch)
tree05bc70111419911287711b82761e48cf92d796bd /clang/lib/CodeGen/CodeGenModule.cpp
parentc018aadc12c8d81ae8c35e644b132da71a4bf5e3 (diff)
downloadbcm5719-llvm-359b885e12815e8d63adcfb5760696bad82c6908.tar.gz
bcm5719-llvm-359b885e12815e8d63adcfb5760696bad82c6908.zip
First pass at abstracting out a class for the target C++ ABI.
llvm-svn: 173514
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index d5284f803c0..2da9dba5b71 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");
OpenPOWER on IntegriCloud