Skip to content

Commit 20a450a

Browse files
committed
DIFinder::processInstruction: handle revng.loop
1 parent e8f1db9 commit 20a450a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

llvm/lib/IR/DebugInfo.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ void DebugInfoFinder::processInstruction(const Module &M,
211211

212212
if (auto DbgLoc = I.getDebugLoc())
213213
processLocation(M, DbgLoc.get());
214+
215+
MDNode *LoopMD = I.getMetadata(LLVMContext::MD_loop);
216+
if (auto *Tuple = cast_or_null<MDTuple>(LoopMD))
217+
for (const MDOperand &Operand : Tuple->operands())
218+
if (const DILocation *Location = dyn_cast<DILocation>(Operand.get()))
219+
processLocation(M, Location);
214220
}
215221

216222
void DebugInfoFinder::processLocation(const Module &M, const DILocation *Loc) {

0 commit comments

Comments
 (0)