summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-21 22:46:04 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-21 22:46:04 +0000
commit86353416a7115dc430b9cd47a1aaeb8f19c34f2c (patch)
treee2708df9c05d35abb3985be8ff502ddf133c0a45 /clang/lib/AST/ASTContext.cpp
parentb186bc3c4b361089918f25f2dcc2de015bb67305 (diff)
downloadbcm5719-llvm-86353416a7115dc430b9cd47a1aaeb8f19c34f2c.tar.gz
bcm5719-llvm-86353416a7115dc430b9cd47a1aaeb8f19c34f2c.zip
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator. Obviously the implementations should closely follow the Itanium ABI except in cases of divergence. llvm-svn: 111749
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index ee4608badc0..890dfc3490a 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -136,13 +136,17 @@ ASTContext::getCanonicalTemplateTemplateParmDecl(
}
CXXABI *ASTContext::createCXXABI(const TargetInfo &T) {
- if (!LangOpts.CPlusPlus) return NULL;
+ if (!LangOpts.CPlusPlus) return 0;
+
switch (T.getCXXABI()) {
- default:
+ case CXXABI_ARM:
+ return CreateARMCXXABI(*this);
+ case CXXABI_Itanium:
return CreateItaniumCXXABI(*this);
case CXXABI_Microsoft:
return CreateMicrosoftCXXABI(*this);
}
+ return 0;
}
ASTContext::ASTContext(const LangOptions& LOpts, SourceManager &SM,
OpenPOWER on IntegriCloud