[PATCH] D45711: [WebAssembly] Add an assertion for an invalid CFG
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 17 14:22:42 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330217: [WebAssembly] Add an assertion for an invalid CFG (authored by aheejin, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D45711
Files:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
Index: llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
===================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -145,6 +145,9 @@
std::prev(InsertPos)->getOpcode() != WebAssembly::END_LOOP)
--InsertPos;
}
+ // The header block in which a 'block' mark will be inserted should have a
+ // terminator because it is branching to a non-layout successor.
+ assert(InsertPos != Header->end());
// Add the BLOCK.
MachineInstr *Begin =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45711.142829.patch
Type: text/x-patch
Size: 616 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180417/fee5eda2/attachment.bin>
More information about the llvm-commits
mailing list