summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ItaniumCXXABI.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/ItaniumCXXABI.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/ItaniumCXXABI.cpp')
-rw-r--r--clang/lib/AST/ItaniumCXXABI.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/AST/ItaniumCXXABI.cpp b/clang/lib/AST/ItaniumCXXABI.cpp
index 0ac80ecd638..c3fa4666537 100644
--- a/clang/lib/AST/ItaniumCXXABI.cpp
+++ b/clang/lib/AST/ItaniumCXXABI.cpp
@@ -11,6 +11,10 @@
// documented at:
// http://www.codesourcery.com/public/cxx-abi/abi.html
// http://www.codesourcery.com/public/cxx-abi/abi-eh.html
+//
+// It also supports the closely-related ARM C++ ABI, documented at:
+// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0041c/IHI0041C_cppabi.pdf
+//
//===----------------------------------------------------------------------===//
#include "CXXABI.h"
@@ -21,6 +25,7 @@ using namespace clang;
namespace {
class ItaniumCXXABI : public CXXABI {
+protected:
ASTContext &Context;
public:
ItaniumCXXABI(ASTContext &Ctx) : Context(Ctx) { }
@@ -31,9 +36,17 @@ public:
return 1;
}
};
+
+class ARMCXXABI : public ItaniumCXXABI {
+public:
+ ARMCXXABI(ASTContext &Ctx) : ItaniumCXXABI(Ctx) { }
+};
}
CXXABI *clang::CreateItaniumCXXABI(ASTContext &Ctx) {
return new ItaniumCXXABI(Ctx);
}
+CXXABI *clang::CreateARMCXXABI(ASTContext &Ctx) {
+ return new ARMCXXABI(Ctx);
+}
OpenPOWER on IntegriCloud