Remove superfluous .str() and replace std::string concatenation with Twine.
[oota-llvm.git] / lib / Target / R600 / AMDGPUPromoteAlloca.cpp
index 175dcd89e529ad746c4070bd4e797a0d6b65dc20..6d5f94e165c9e2546f41a2b2686e7e85ebe13786 100644 (file)
@@ -366,8 +366,8 @@ void AMDGPUPromoteAlloca::visitAlloca(AllocaInst &I) {
       Function *F = Call->getCalledFunction();
       FunctionType *NewType = FunctionType::get(Call->getType(), ArgTypes,
                                                 F->isVarArg());
-      Constant *C = Mod->getOrInsertFunction(StringRef(F->getName().str() + ".local"), NewType,
-                                             F->getAttributes());
+      Constant *C = Mod->getOrInsertFunction((F->getName() + ".local").str(),
+                                             NewType, F->getAttributes());
       Function *NewF = cast<Function>(C);
       Call->setCalledFunction(NewF);
       continue;