[PATCH] D40413: [CodeExtractor] Add debug locations for new call and branch instrs.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 06:29:32 PST 2017
fhahn added inline comments.
================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:1050
+ }
+ assert(BranchI->getDebugLoc() && "Could not find debug location in header");
+ }
----------------
fhahn wrote:
> aprantl wrote:
> > This assertion will fail if you haved a nodebug function inlined into a function with debuginfo.
> Ah yes, I will look into how the inliner deals with that case and handle it appropriately.
The basic block `header` is from a function with debug info (it comes from `oldFunction`). Isn't it save to assume that instructions in this basic block should have debug info? Do you mean when inlining a nodebug function in one with debug info, some basic blocks could be missing debug info which could trigger this assertion in the partial inliner? (Sorry my knowledge of the assumptions about debug info are quite light).
https://reviews.llvm.org/D40413
More information about the llvm-commits
mailing list