From: Jakub Staszak Date: Mon, 16 Sep 2013 22:03:38 +0000 (+0000) Subject: Use reference instead of copy. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b06ea25b4c4cff341194279e01c08d23fa022378;p=oota-llvm.git Use reference instead of copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190813 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/ShrinkWrapping.cpp b/lib/CodeGen/ShrinkWrapping.cpp index 6c826deaf09..2b01fdd8d06 100644 --- a/lib/CodeGen/ShrinkWrapping.cpp +++ b/lib/CodeGen/ShrinkWrapping.cpp @@ -357,7 +357,7 @@ void PEI::propagateUsesAroundLoop(MachineBasicBlock* MBB, MachineLoop* LP) { /// bool PEI::calculateSets(MachineFunction &Fn) { // Sets used to compute spill, restore placement sets. - const std::vector CSI = + const std::vector &CSI = Fn.getFrameInfo()->getCalleeSavedInfo(); // If no CSRs used, we are done. @@ -1054,7 +1054,7 @@ std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) { std::string PEI::stringifyCSRegSet(const CSRegSet& s) { const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo(); - const std::vector CSI = + const std::vector &CSI = MF->getFrameInfo()->getCalleeSavedInfo(); std::ostringstream srep; diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp index ae88a3ee73c..2733f64a31a 100644 --- a/lib/MC/MCParser/AsmParser.cpp +++ b/lib/MC/MCParser/AsmParser.cpp @@ -1646,7 +1646,7 @@ void AsmParser::DiagHandler(const SMDiagnostic &Diag, void *Context) { // Use the CppHashFilename and calculate a line number based on the // CppHashLoc and CppHashLineNumber relative to this Diag's SMLoc for // the diagnostic. - const std::string Filename = Parser->CppHashFilename; + const std::string &Filename = Parser->CppHashFilename; int DiagLocLineNo = DiagSrcMgr.FindLineNumber(DiagLoc, DiagBuf); int CppHashLocLineNo =