]> granicus.if.org Git - clang/blob - lib/CodeGen/CGCXXABI.h
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
[clang] / lib / CodeGen / CGCXXABI.h
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 CGCXXABI {
25 public:
26   virtual ~CGCXXABI();
27
28   /// Gets the mangle context.
29   virtual MangleContext &getMangleContext() = 0;
30 };
31
32 /// Creates an instance of a C++ ABI class.
33 CGCXXABI *CreateARMCXXABI(CodeGenModule &CGM);
34 CGCXXABI *CreateItaniumCXXABI(CodeGenModule &CGM);
35 CGCXXABI *CreateMicrosoftCXXABI(CodeGenModule &CGM);
36 }
37 }
38
39 #endif