summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2007-09-18 09:10:16 +0000
committerBill Wendling <isanbard@gmail.com>2007-09-18 09:10:16 +0000
commite8c885f261a47684ec144aed70013e3ac1653083 (patch)
tree1286f84d06a812714deab776c0fe260fbc350284
parenta83fd8014d2aed2429f6b9be51b22f1493baae86 (diff)
downloadbcm5719-llvm-e8c885f261a47684ec144aed70013e3ac1653083.tar.gz
bcm5719-llvm-e8c885f261a47684ec144aed70013e3ac1653083.zip
Don't pass back a reference to a temporary.
llvm-svn: 42086
-rw-r--r--llvm/include/llvm/CodeGen/AsmPrinter.h2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp3
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h
index 31fb0f43e2c..4a312a79a28 100644
--- a/llvm/include/llvm/CodeGen/AsmPrinter.h
+++ b/llvm/include/llvm/CodeGen/AsmPrinter.h
@@ -115,7 +115,7 @@ namespace llvm {
/// getCurrentFunctionEHName - Called to return (and cache) the
/// CurrentFnEHName.
///
- const std::string &getCurrentFunctionEHName(const MachineFunction *MF);
+ std::string getCurrentFunctionEHName(const MachineFunction *MF);
protected:
/// doInitialization - Set up the AsmPrinter when we are working on a new
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 7b579c4ea30..6622bcdee66 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -160,8 +160,7 @@ bool AsmPrinter::doFinalization(Module &M) {
return false;
}
-const std::string &
-AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
+std::string AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
assert(MF && "No machine function?");
return Mang->makeNameProper(MF->getFunction()->getName() + ".eh",
TAI->getGlobalPrefix());
OpenPOWER on IntegriCloud