blob: 98db75ea2b4646c4238a2c0ab1a403255ade2a69 [file] [log] [blame]
Charles Davis3a811f12010-05-25 19:52:27 +00001//===------- ItaniumCXXABI.cpp - Emit LLVM Code from ASTs for a Module ----===//
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 C++ code generation targetting the Itanium C++ ABI. The class
11// in this file generates structures that follow the Itanium C++ ABI, which is
12// documented at:
13// http://www.codesourcery.com/public/cxx-abi/abi.html
14// http://www.codesourcery.com/public/cxx-abi/abi-eh.html
15//===----------------------------------------------------------------------===//
16
17#include "CGCXXABI.h"
18#include "CodeGenModule.h"
19#include "Mangle.h"
20
21using namespace clang;
22
23namespace {
24class ItaniumCXXABI : public CodeGen::CXXABI {
25 CodeGen::MangleContext MangleCtx;
26public:
27 ItaniumCXXABI(CodeGen::CodeGenModule &CGM) :
28 MangleCtx(CGM.getContext(), CGM.getDiags()) { }
29
30 CodeGen::MangleContext &getMangleContext() {
31 return MangleCtx;
32 }
33};
34}
35
36CodeGen::CXXABI *CodeGen::CreateItaniumCXXABI(CodeGenModule &CGM) {
37 return new ItaniumCXXABI(CGM);
38}
39