Skip to content

Commit

Permalink
Change asserts to aborts
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaraldi authored Feb 25, 2025
1 parent 970a2b0 commit 4f3c517
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/llvm-late-gc-lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,8 @@ void RecursivelyVisit(callback f, Value *V) {
}
llvm_dump(V);
llvm_dump(TheUser);
assert(false && "Unexpected instruction");
errs() << "Unexpected instruction\n"
abort()
}
}

Expand Down Expand Up @@ -1138,11 +1139,13 @@ static SmallSetVector<AllocaInst *, 8> FindSretAllocas(Value* SRetArg) {
worklist.insert(FalseBranch);
} else {
llvm_dump(SI);
assert(false && "Malformed Select");
dbgs() << "Malformed Select\n";
abort;
}
} else {
llvm_dump(V);
assert(false && "Unexpected SRet argument");
dbgs() << "Unexpected SRet argument\n";
abort();
}
}
}
Expand Down Expand Up @@ -1221,7 +1224,8 @@ State LateLowerGCFrame::LocalScan(Function &F) {
SmallSetVector<AllocaInst *, 8> gc_allocas = FindSretAllocas(arg1);
if (gc_allocas.size() == 0) {
llvm_dump(CI);
assert(false && "Expected at least one alloca");
errs() << "Expected one Alloca at least\n";
abort();
}
else {
for (AllocaInst* SRet_gc : gc_allocas) {
Expand Down

0 comments on commit 4f3c517

Please sign in to comment.