[Bug] The compiler should not bail when there is data before the FuncEnd node

This commit is contained in:
kobalicek
2022-06-27 12:10:40 +02:00
parent 70209cddd7
commit 35f92e8706

View File

@@ -401,7 +401,7 @@ public:
if (node->type() == NodeType::kSentinel) {
if (node == _funcNode->endNode()) {
// Make sure we didn't flow here if this is the end of the function sentinel.
if (ASMJIT_UNLIKELY(_curBlock))
if (ASMJIT_UNLIKELY(_curBlock && _hasCode))
return DebugUtils::errored(kErrorInvalidState);
break;
}