[cfe-commits] r90854 - /cfe/trunk/lib/CodeGen/CGDecl.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Dec 8 05:07:38 PST 2009


Author: d0k
Date: Tue Dec  8 07:07:37 2009
New Revision: 90854

URL: http://llvm.org/viewvc/llvm-project?rev=90854&view=rev
Log:
Use a Twine to concatenate the name instead of going through std::string.

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=90854&r1=90853&r2=90854&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Tue Dec  8 07:07:37 2009
@@ -654,10 +654,8 @@
     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);





More information about the cfe-commits mailing list