[llvm] r190813 - Use reference instead of copy.
Jakub Staszak
kubastaszak at gmail.com
Mon Sep 16 15:03:38 PDT 2013
Author: kuba
Date: Mon Sep 16 17:03:38 2013
New Revision: 190813
URL: http://llvm.org/viewvc/llvm-project?rev=190813&view=rev
Log:
Use reference instead of copy.
Modified:
llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp
llvm/trunk/lib/MC/MCParser/AsmParser.cpp
Modified: llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp?rev=190813&r1=190812&r2=190813&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp (original)
+++ llvm/trunk/lib/CodeGen/ShrinkWrapping.cpp Mon Sep 16 17:03:38 2013
@@ -357,7 +357,7 @@ void PEI::propagateUsesAroundLoop(Machin
///
bool PEI::calculateSets(MachineFunction &Fn) {
// Sets used to compute spill, restore placement sets.
- const std::vector<CalleeSavedInfo> CSI =
+ const std::vector<CalleeSavedInfo> &CSI =
Fn.getFrameInfo()->getCalleeSavedInfo();
// If no CSRs used, we are done.
@@ -1054,7 +1054,7 @@ std::string PEI::getBasicBlockName(const
std::string PEI::stringifyCSRegSet(const CSRegSet& s) {
const TargetRegisterInfo* TRI = MF->getTarget().getRegisterInfo();
- const std::vector<CalleeSavedInfo> CSI =
+ const std::vector<CalleeSavedInfo> &CSI =
MF->getFrameInfo()->getCalleeSavedInfo();
std::ostringstream srep;
Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=190813&r1=190812&r2=190813&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Mon Sep 16 17:03:38 2013
@@ -1646,7 +1646,7 @@ void AsmParser::DiagHandler(const SMDiag
// 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 =
More information about the llvm-commits
mailing list