diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-08 13:07:37 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-12-08 13:07:37 +0000 |
commit | 43c7c5befd8e759953c44670406faa4f1b4961c8 (patch) | |
tree | 27cac9c9aca09a8f85274f3b9209c289e8e643a8 /clang/lib | |
parent | c6ad84cb3c37336dbff9b5d04ee9984e3229cbc9 (diff) | |
download | bcm5719-llvm-43c7c5befd8e759953c44670406faa4f1b4961c8.tar.gz bcm5719-llvm-43c7c5befd8e759953c44670406faa4f1b4961c8.zip |
Use a Twine to concatenate the name instead of going through std::string.
llvm-svn: 90854
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 372195f5f10..7df2380ad42 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -654,10 +654,8 @@ void CodeGenFunction::EmitParmDecl(const VarDecl &D, llvm::Value *Arg) { const llvm::Type *LTy = ConvertTypeForMem(Ty); if (LTy->isSingleValueType()) { // TODO: Alignment - std::string Name = D.getNameAsString(); - Name += ".addr"; DeclPtr = CreateTempAlloca(LTy); - DeclPtr->setName(Name.c_str()); + DeclPtr->setName(D.getNameAsString() + llvm::StringRef(".addr")); // Store the initial value into the alloca. EmitStoreOfScalar(Arg, DeclPtr, CTy.isVolatileQualified(), Ty); |