From 5d11ea39f7f78169efdc4a62fd924e8f0661ca55 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 1 May 2010 00:33:16 +0000 Subject: [PATCH] Don't pass SDValues by non-const reference unless they may be modified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102816 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 3 ++- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 19169f69a66..a38b204b247 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -3685,7 +3685,8 @@ static SDValue ExpandPowI(DebugLoc DL, SDValue LHS, SDValue RHS, bool SelectionDAGBuilder::EmitFuncArgumentDbgValue(const DbgValueInst &DI, const Value *V, MDNode *Variable, - uint64_t Offset, SDValue &N) { + uint64_t Offset, + const SDValue &N) { if (!isa(V)) return false; diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index baed7e6677e..3fcd4b9dc43 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -500,7 +500,7 @@ private: /// the entry BB. bool EmitFuncArgumentDbgValue(const DbgValueInst &DI, const Value *V, MDNode *Variable, - uint64_t Offset, SDValue &N); + uint64_t Offset, const SDValue &N); }; } // end namespace llvm