[PATCH] D85670: [Instruction] Add updateLocationAfterHoist helper

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 14:59:31 PDT 2020


vsk reopened this revision.
vsk added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/IR/DebugInfo.cpp:714
+  // to avoid making it look like the inlined callee was reached early.
+  setDebugLoc(DebugLoc::get(0, 0, DL.getScope()));
+}
----------------
This causes some bots to fail with "attachment points at wrong subprogram for function" verifier errors. The verifier check tests that a location's inlinedAt scope describes the parent function it's in. I believe the correct way to handle calls which have a location is to set the parent function's scope on the call (if the parent function has a scope), and to fall back to using `DebugLoc::get(0, 0, DL.getScope(), DL.getInlinedAt())` if not.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85670/new/

https://reviews.llvm.org/D85670



More information about the llvm-commits mailing list