diff options
| author | Charles Davis <cdavis@mines.edu> | 2010-05-25 19:52:27 +0000 |
|---|---|---|
| committer | Charles Davis <cdavis@mines.edu> | 2010-05-25 19:52:27 +0000 |
| commit | 4e786ddccbb1321d0cccac57da2e887dd5fd83cb (patch) | |
| tree | f92981c1fb0c5050c473e1e33bb3b7e6db0b9ddd /clang/lib/CodeGen/CGCXXABI.h | |
| parent | 3311eb50d7a94debbe41f5abcbaab8fbc522fcad (diff) | |
| download | bcm5719-llvm-4e786ddccbb1321d0cccac57da2e887dd5fd83cb.tar.gz bcm5719-llvm-4e786ddccbb1321d0cccac57da2e887dd5fd83cb.zip | |
IRgen: Add a stub class for generating ABI-specific C++ code.
This class only supports name mangling (which is apparently used during C/ObjC
codegen). For now only the Itanium C++ ABI is supported. Patches to add a
second C++ ABI are forthcoming.
llvm-svn: 104630
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.h')
| -rw-r--r-- | clang/lib/CodeGen/CGCXXABI.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h new file mode 100644 index 00000000000..a7e18714e8b --- /dev/null +++ b/clang/lib/CodeGen/CGCXXABI.h @@ -0,0 +1,37 @@ +//===----- CGCXXABI.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++ code generation. Concrete subclasses +// of this implement code generation for specific C++ ABIs. +// +//===----------------------------------------------------------------------===// + +#ifndef CLANG_CODEGEN_CXXABI_H +#define CLANG_CODEGEN_CXXABI_H + +namespace clang { +namespace CodeGen { + class CodeGenModule; + class MangleContext; + +/// Implements C++ ABI-specific code generation functions. +class CXXABI { +public: + virtual ~CXXABI(); + + /// Gets the mangle context. + virtual MangleContext &getMangleContext() = 0; +}; + +/// Creates an instance of a C++ ABI class. +CXXABI *CreateItaniumCXXABI(CodeGenModule &CGM); +} +} + +#endif |

