Skip to content

Commit ba03e3f

Browse files
Revert CIRGenItaniumCXXABI.cpp
1 parent 22fdf39 commit ba03e3f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2278,7 +2278,11 @@ void CIRGenItaniumCXXABI::emitRethrow(CIRGenFunction &CGF, bool isNoReturn) {
22782278
auto currentBlock = builder.getInsertionBlock();
22792279
auto reg = currentBlock->getParent();
22802280

2281-
bool branch = !currentBlock->empty();
2281+
bool branch = false;
2282+
if (currentBlock->empty())
2283+
currentBlock->erase();
2284+
else
2285+
branch = true;
22822286

22832287
auto rethrowBlock = builder.createBlock(reg);
22842288
builder.setInsertionPointToStart(rethrowBlock);

0 commit comments

Comments
 (0)