diff options
author | Anders Carlsson <andersca@mac.com> | 2010-06-22 16:05:32 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-06-22 16:05:32 +0000 |
commit | 793a990774826a0c20b0da66cec0991badfb8b63 (patch) | |
tree | 28fe840af8e7c1a1ae574583fe4570dea8fe997b /lib/CodeGen/CodeGenModule.h | |
parent | dc5daec0d30959bf081544f72d378f6f96cf9b1a (diff) |
Add a new variant of getMangledName that caches the mangling for decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index fbb5d35022..399f9c667d 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -151,6 +151,10 @@ class CodeGenModule : public BlockModule { /// priorities to be emitted when the translation unit is complete. CtorList GlobalDtors; + /// MangledDeclNames - A map of canonical GlobalDecls to their mangled names. + llvm::DenseMap<GlobalDecl, llvm::StringRef> MangledDeclNames; + llvm::BumpPtrAllocator MangledNamesAllocator; + std::vector<llvm::Constant*> Annotations; llvm::StringMap<llvm::Constant*> CFConstantStringMap; @@ -460,6 +464,7 @@ public: AttributeListType &PAL, unsigned &CallingConv); + llvm::StringRef getMangledName(GlobalDecl GD); void getMangledName(MangleBuffer &Buffer, GlobalDecl D); void getMangledName(MangleBuffer &Buffer, const BlockDecl *BD); |