blob: 4b38d7afb6a4a2fac97c24974c7f84a64092dfd7 [file] [log] [blame]
Charles Davis071cc7d2010-08-16 03:33:14 +00001//===----- 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
18namespace clang {
19
20class ASTContext;
21class MemberPointerType;
22
23/// Implements C++ ABI-specific semantic analysis functions.
24class CXXABI {
25public:
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 McCallee79a4c2010-08-21 22:46:04 +000034CXXABI *CreateARMCXXABI(ASTContext &Ctx);
Charles Davis071cc7d2010-08-16 03:33:14 +000035CXXABI *CreateItaniumCXXABI(ASTContext &Ctx);
36CXXABI *CreateMicrosoftCXXABI(ASTContext &Ctx);
37}
38
39#endif