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 | ea836bc41c850d206f3bc19e5089de77baecfbb3 (patch) | |
tree | 1da4ee9b0d79327fd3b2bb91bdfc191378b715ab /clang/lib/CodeGen/CGDecl.cpp | |
parent | 9c47dac677ddd4ea3e43aa9a16506221ec124a43 (diff) | |
download | bcm5719-llvm-ea836bc41c850d206f3bc19e5089de77baecfbb3.tar.gz bcm5719-llvm-ea836bc41c850d206f3bc19e5089de77baecfbb3.zip |
Switch over to the new caching version of getMangledName.
llvm-svn: 106549
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index d20a7726d01..ee8fadadc53 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -139,16 +139,14 @@ static std::string GetStaticDeclName(CodeGenFunction &CGF, const VarDecl &D, const char *Separator) { CodeGenModule &CGM = CGF.CGM; if (CGF.getContext().getLangOptions().CPlusPlus) { - MangleBuffer Name; - CGM.getMangledName(Name, &D); - return Name.getString().str(); + llvm::StringRef Name = CGM.getMangledName(&D); + return Name.str(); } std::string ContextName; if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(CGF.CurFuncDecl)) { - MangleBuffer Name; - CGM.getMangledName(Name, FD); - ContextName = Name.getString().str(); + llvm::StringRef Name = CGM.getMangledName(FD); + ContextName = Name.str(); } else if (isa<ObjCMethodDecl>(CGF.CurFuncDecl)) ContextName = CGF.CurFn->getName(); else |