aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-10-07 01:06:45 +0000
committerAnders Carlsson <andersca@mac.com>2009-10-07 01:06:45 +0000
commitb540491851910c2efa68196a8bdc2eed1071c17d (patch)
tree4b447bf47fdeef16f02a2ca43dcd60828af668a3 /lib/CodeGen/CodeGenModule.cpp
parent3d92d8c94e9447a6d903241e180590b4025c5927 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 50b74f31fa..246beaa403 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -39,7 +39,7 @@ CodeGenModule::CodeGenModule(ASTContext &C, const CompileOptions &compileOpts,
Diagnostic &diags)
: BlockModule(C, M, TD, Types, *this), Context(C),
Features(C.getLangOptions()), CompileOpts(compileOpts), TheModule(M),
- TheTargetData(TD), Diags(diags), Types(C, M, TD), Runtime(0),
+ TheTargetData(TD), Diags(diags), Types(C, M, TD), MangleCtx(C), Runtime(0),
MemCpyFn(0), MemMoveFn(0), MemSetFn(0), CFConstantStringClassRef(0),
VMContext(M.getContext()) {
@@ -166,7 +166,7 @@ const char *CodeGenModule::getMangledName(const NamedDecl *ND) {
llvm::SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
- if (!mangleName(ND, Context, Out)) {
+ if (!mangleName(getMangleContext(), ND, Out)) {
assert(ND->getIdentifier() && "Attempt to mangle unnamed decl.");
return ND->getNameAsCString();
}