Charles Davis | 3a811f1 | 2010-05-25 19:52:27 +0000 | [diff] [blame] | 1 | //===----- CGCXXABI.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++ code generation. Concrete subclasses |
| 11 | // of this implement code generation for specific C++ ABIs. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef CLANG_CODEGEN_CXXABI_H |
| 16 | #define CLANG_CODEGEN_CXXABI_H |
| 17 | |
| 18 | namespace clang { |
| 19 | namespace CodeGen { |
| 20 | class CodeGenModule; |
| 21 | class MangleContext; |
| 22 | |
| 23 | /// Implements C++ ABI-specific code generation functions. |
| 24 | class CXXABI { |
| 25 | public: |
| 26 | virtual ~CXXABI(); |
| 27 | |
| 28 | /// Gets the mangle context. |
| 29 | virtual MangleContext &getMangleContext() = 0; |
| 30 | }; |
| 31 | |
| 32 | /// Creates an instance of a C++ ABI class. |
| 33 | CXXABI *CreateItaniumCXXABI(CodeGenModule &CGM); |
Charles Davis | c392664 | 2010-06-09 23:25:41 +0000 | [diff] [blame] | 34 | CXXABI *CreateMicrosoftCXXABI(CodeGenModule &CGM); |
Charles Davis | 3a811f1 | 2010-05-25 19:52:27 +0000 | [diff] [blame] | 35 | } |
| 36 | } |
| 37 | |
| 38 | #endif |