[PATCH] D67723: [DebugInfo] Add option to disable inline line tables.
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 15:41:09 PDT 2019
rnk added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1428
+ if (isa<DbgInfoIntrinsic>(BI)) {
+ BI = --(BI->eraseFromParent());
+ continue;
----------------
Will this work if the dbg.value is the first instruction of a basic block? I'd expect eraseFromParent to return a new iterator pointing to FI->begin(), then operator-- to back up to "before begin", which would probably crash or assert. This would make a good test case and shouldn't be too hard. You can try inlining `foo` in this example:
```
void bar();
int foo(bool cond, int x) {
if (cond) {
x = 42; // should set up a dbg.value at BB start
bar(); // block select formation
}
return x;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67723/new/
https://reviews.llvm.org/D67723
More information about the llvm-commits
mailing list