blob: 77cbd9775191669476b0725f4c0fea93c9422e92 [file] [log] [blame]
Douglas Gregor5f361c92009-02-18 23:53:56 +00001//===--- Mangle.h - Mangle C++ Names ----------------------------*- C++ -*-===//
Douglas Gregor5fec5b02009-02-13 00:10:09 +00002//
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// Implements C++ name mangling according to the Itanium C++ ABI,
11// which is used in GCC 3.2 and newer (and many compilers that are
12// ABI-compatible with GCC):
13//
14// http://www.codesourcery.com/public/cxx-abi/abi.html
15//
16//===----------------------------------------------------------------------===//
Chris Lattner65749062009-03-21 08:24:40 +000017
Douglas Gregor5fec5b02009-02-13 00:10:09 +000018#ifndef LLVM_CLANG_CODEGEN_MANGLE_H
19#define LLVM_CLANG_CODEGEN_MANGLE_H
20
Anders Carlssone4c40c82009-04-15 05:36:58 +000021#include "CGCXX.h"
22
Douglas Gregor5fec5b02009-02-13 00:10:09 +000023namespace llvm {
24 class raw_ostream;
25}
26
27namespace clang {
28 class ASTContext;
Anders Carlssone4c40c82009-04-15 05:36:58 +000029 class CXXConstructorDecl;
Anders Carlssoneaa28f72009-04-17 01:58:57 +000030 class CXXDestructorDecl;
Douglas Gregor5fec5b02009-02-13 00:10:09 +000031 class NamedDecl;
Anders Carlsson0c08f6f2009-04-13 18:02:10 +000032 class VarDecl;
33
Douglas Gregor5fec5b02009-02-13 00:10:09 +000034 bool mangleName(const NamedDecl *D, ASTContext &Context,
35 llvm::raw_ostream &os);
Anders Carlsson0c08f6f2009-04-13 18:02:10 +000036 void mangleGuardVariable(const VarDecl *D, ASTContext &Context,
37 llvm::raw_ostream &os);
Anders Carlssone4c40c82009-04-15 05:36:58 +000038 void mangleCXXCtor(const CXXConstructorDecl *D, CXXCtorType Type,
39 ASTContext &Context, llvm::raw_ostream &os);
Anders Carlssoneaa28f72009-04-17 01:58:57 +000040 void mangleCXXDtor(const CXXDestructorDecl *D, CXXDtorType Type,
41 ASTContext &Context, llvm::raw_ostream &os);
Douglas Gregor5fec5b02009-02-13 00:10:09 +000042}
43
44#endif