[PATCH] D45711: [WebAssembly] Add an assertion for an invalid CFG

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 12:23:11 PDT 2018


OK - so would "skipDebugInstructionsForward" ever need the end iterator?
since it should always come across a non-debug instruction (all valid BBs
have at least one non-debug instruction, the terminator - though I guess
you might call this function on an invalid basic block during
construction/intermediate state changes, etc).

& if it doesn't need the end, then it doesn't need the MBB and could be a
static function.

On Mon, Apr 16, 2018 at 7:49 PM Heejin Ahn via Phabricator <
reviews at reviews.llvm.org> wrote:

> aheejin added a comment.
>
> > Maybe this could be tested for, though - without debug info this
> findDebugLoc would potentially search forever or crash, perhaps? Since it
> would never compare == end (because it's a comparison across two different
> lists)? Seems like it'd be good to have that test case?
>
> No, if there is at least a single instruction within `Header` and it does
> not have debug info, it would just return it's empty debug info. It
> wouldn't search onward past `end()`.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D45711
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180417/cf726f01/attachment.html>


More information about the llvm-commits mailing list