From b540491851910c2efa68196a8bdc2eed1071c17d Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Wed, 7 Oct 2009 01:06:45 +0000 Subject: Add a MangleContext and pass it to all mangle functions. It will be used for keeping state, such as identifiers assigned to anonymous structs as well as scope encoding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83442 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index b46b4ef860..49bb0bffec 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -22,6 +22,7 @@ #include "CGCall.h" #include "CGCXX.h" #include "CodeGenTypes.h" +#include "Mangle.h" #include "llvm/Module.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringMap.h" @@ -123,9 +124,11 @@ class CodeGenModule : public BlockModule { const llvm::TargetData &TheTargetData; Diagnostic &Diags; CodeGenTypes Types; + MangleContext MangleCtx; + CGObjCRuntime* Runtime; CGDebugInfo* DebugInfo; - + llvm::Function *MemCpyFn; llvm::Function *MemMoveFn; llvm::Function *MemSetFn; @@ -217,6 +220,7 @@ public: const LangOptions &getLangOptions() const { return Features; } llvm::Module &getModule() const { return TheModule; } CodeGenTypes &getTypes() { return Types; } + MangleContext &getMangleContext() { return MangleCtx; } Diagnostic &getDiags() const { return Diags; } const llvm::TargetData &getTargetData() const { return TheTargetData; } llvm::LLVMContext &getLLVMContext() { return VMContext; } -- cgit v1.2.3-70-g09d2