Charles Davis | 071cc7d | 2010-08-16 03:33:14 +0000 | [diff] [blame] | 1 | //===----- CXXABI.h - Interface to C++ ABIs ---------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This provides an abstract class for C++ AST support. Concrete |
| 11 | // subclasses of this implement AST support for specific C++ ABIs. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef LLVM_CLANG_AST_CXXABI_H |
| 16 | #define LLVM_CLANG_AST_CXXABI_H |
| 17 | |
| 18 | namespace clang { |
| 19 | |
| 20 | class ASTContext; |
| 21 | class MemberPointerType; |
| 22 | |
| 23 | /// Implements C++ ABI-specific semantic analysis functions. |
| 24 | class CXXABI { |
| 25 | public: |
| 26 | virtual ~CXXABI(); |
| 27 | |
| 28 | /// Returns the size of a member pointer in multiples of the target |
| 29 | /// pointer size. |
| 30 | virtual unsigned getMemberPointerSize(const MemberPointerType *MPT) const = 0; |
| 31 | }; |
| 32 | |
| 33 | /// Creates an instance of a C++ ABI class. |
John McCall | ee79a4c | 2010-08-21 22:46:04 +0000 | [diff] [blame] | 34 | CXXABI *CreateARMCXXABI(ASTContext &Ctx); |
Charles Davis | 071cc7d | 2010-08-16 03:33:14 +0000 | [diff] [blame] | 35 | CXXABI *CreateItaniumCXXABI(ASTContext &Ctx); |
| 36 | CXXABI *CreateMicrosoftCXXABI(ASTContext &Ctx); |
| 37 | } |
| 38 | |
| 39 | #endif |