diff --git a/lib/SIL/IR/SILBasicBlock.cpp b/lib/SIL/IR/SILBasicBlock.cpp index 2810e8331b442..afba4ca1de2a7 100644 --- a/lib/SIL/IR/SILBasicBlock.cpp +++ b/lib/SIL/IR/SILBasicBlock.cpp @@ -441,7 +441,7 @@ bool SILBasicBlock::hasPhi() const { const SILDebugScope *SILBasicBlock::getScopeOfFirstNonMetaInstruction() { for (auto &Inst : *this) - if (Inst.isMetaInstruction()) + if (!Inst.isMetaInstruction()) return Inst.getDebugScope(); return begin()->getDebugScope(); }