diff options
author | Charles Davis <cdavis@mines.edu> | 2010-08-16 03:33:14 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-08-16 03:33:14 +0000 |
commit | 53c59df2f7d2395c6b44a1b7ff5ec6be6792e150 (patch) | |
tree | 8bff2acce252777eb676dba37f3181040ab41eab /clang/lib/AST/CXXABI.h | |
parent | df28e8ec4145fbe407f09dc2458d42cd9f12bd99 (diff) | |
download | bcm5719-llvm-53c59df2f7d2395c6b44a1b7ff5ec6be6792e150.tar.gz bcm5719-llvm-53c59df2f7d2395c6b44a1b7ff5ec6be6792e150.zip |
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.
llvm-svn: 111117
Diffstat (limited to 'clang/lib/AST/CXXABI.h')
-rw-r--r-- | clang/lib/AST/CXXABI.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/clang/lib/AST/CXXABI.h b/clang/lib/AST/CXXABI.h new file mode 100644 index 00000000000..8781bd7c75f --- /dev/null +++ b/clang/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 |