summaryrefslogtreecommitdiffstats
path: root/lib/AST/CXXABI.h
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2010-08-16 03:33:14 +0000
committerCharles Davis <cdavis@mines.edu>2010-08-16 03:33:14 +0000
commit071cc7deffad608165b1ddd5263e8bf181861520 (patch)
tree6d68d7edf284b5e28784142748d07350ba20d9a3 /lib/AST/CXXABI.h
parente701117b21356d3c60133315b5bdd50232ec6cca (diff)
Implement support for member pointers under the Microsoft C++ ABI in the
AST library. This also adds infrastructure for supporting multiple C++ ABIs in the AST. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CXXABI.h')
-rw-r--r--lib/AST/CXXABI.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/AST/CXXABI.h b/lib/AST/CXXABI.h
new file mode 100644
index 0000000000..8781bd7c75
--- /dev/null
+++ b/lib/AST/CXXABI.h
@@ -0,0 +1,38 @@
+//===----- CXXABI.h - Interface to C++ ABIs ---------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This provides an abstract class for C++ AST support. Concrete
+// subclasses of this implement AST support for specific C++ ABIs.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_AST_CXXABI_H
+#define LLVM_CLANG_AST_CXXABI_H
+
+namespace clang {
+
+class ASTContext;
+class MemberPointerType;
+
+/// Implements C++ ABI-specific semantic analysis functions.
+class CXXABI {
+public:
+ virtual ~CXXABI();
+
+ /// Returns the size of a member pointer in multiples of the target
+ /// pointer size.
+ virtual unsigned getMemberPointerSize(const MemberPointerType *MPT) const = 0;
+};
+
+/// Creates an instance of a C++ ABI class.
+CXXABI *CreateItaniumCXXABI(ASTContext &Ctx);
+CXXABI *CreateMicrosoftCXXABI(ASTContext &Ctx);
+}
+
+#endif