diff options
author | Anders Carlsson <andersca@mac.com> | 2009-10-07 01:06:45 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-10-07 01:06:45 +0000 |
commit | ff971e8bf4aa7730ebbb242ddb08f5c4123c75a0 (patch) | |
tree | d58f0c2faefa670803830e1efce4d90afee2b5af /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | e666bc9f640bafd3f6c31299a59f9daae892da79 (diff) | |
download | bcm5719-llvm-ff971e8bf4aa7730ebbb242ddb08f5c4123c75a0.tar.gz bcm5719-llvm-ff971e8bf4aa7730ebbb242ddb08f5c4123c75a0.zip |
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.
llvm-svn: 83442
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 50b74f31fae..246beaa4034 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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(); } |