From 793a990774826a0c20b0da66cec0991badfb8b63 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 22 Jun 2010 16:05:32 +0000 Subject: 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 --- lib/CodeGen/CodeGenModule.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/CodeGenModule.h') 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 MangledDeclNames; + llvm::BumpPtrAllocator MangledNamesAllocator; + std::vector Annotations; llvm::StringMap 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); -- cgit v1.2.3