[CodeGen] SDDbgValue::getSDNodes() - use const-ref to avoid unnecessary copies. NFCI.

Reported by MSVC static analyzer.
This commit is contained in:
Simon Pilgrim 2021-09-21 10:12:56 +01:00
parent 9d7b7350c9
commit 0f83456cf5
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ public:
// Returns the SDNodes which this SDDbgValue depends on.
SmallVector<SDNode *> getSDNodes() const {
SmallVector<SDNode *> Dependencies;
for (SDDbgOperand DbgOp : getLocationOps())
for (const SDDbgOperand &DbgOp : getLocationOps())
if (DbgOp.getKind() == SDDbgOperand::SDNODE)
Dependencies.push_back(DbgOp.getSDNode());
for (SDNode *Node : getAdditionalDependencies())