diff options
author | Anders Carlsson <andersca@mac.com> | 2010-06-22 16:16:50 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-06-22 16:16:50 +0000 |
commit | 9a20d55807cc2f6534a9c51a46cc8143ed16786d (patch) | |
tree | 7a6e2fa71fc6792b6f1a823ef00deb1e59fd21ea /lib/CodeGen/CGCXX.cpp | |
parent | 793a990774826a0c20b0da66cec0991badfb8b63 (diff) |
Switch over to the new caching version of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index d712fa4bb3..353a7bcf8f 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -166,8 +166,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl, new llvm::GlobalAlias(AliasType, Linkage, "", Aliasee, &getModule()); // Switch any previous uses to the alias. - MangleBuffer MangledName; - getMangledName(MangledName, AliasDecl); + llvm::StringRef MangledName = getMangledName(AliasDecl); llvm::GlobalValue *Entry = GetGlobalValue(MangledName); if (Entry) { assert(Entry->isDeclaration() && "definition already exists for alias"); @@ -177,7 +176,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl, Entry->replaceAllUsesWith(Alias); Entry->eraseFromParent(); } else { - Alias->setName(MangledName.getString()); + Alias->setName(MangledName); } // Finally, set up the alias with its proper name and attributes. @@ -220,8 +219,7 @@ CodeGenModule::GetAddrOfCXXConstructor(const CXXConstructorDecl *D, CXXCtorType Type) { GlobalDecl GD(D, Type); - MangleBuffer Name; - getMangledName(Name, GD); + llvm::StringRef Name = getMangledName(GD); if (llvm::GlobalValue *V = GetGlobalValue(Name)) return V; @@ -279,8 +277,7 @@ CodeGenModule::GetAddrOfCXXDestructor(const CXXDestructorDecl *D, CXXDtorType Type) { GlobalDecl GD(D, Type); - MangleBuffer Name; - getMangledName(Name, GD); + llvm::StringRef Name = getMangledName(GD); if (llvm::GlobalValue *V = GetGlobalValue(Name)) return V; |