Skip to content

Commit b5ef012

Browse files
gbaraldiZentrik
authored andcommitted
Change asserts to aborts
1 parent 30043da commit b5ef012

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/llvm-late-gc-lowering.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,8 @@ void RecursivelyVisit(callback f, Value *V) {
749749
}
750750
llvm_dump(V);
751751
llvm_dump(TheUser);
752-
assert(false && "Unexpected instruction");
752+
errs() << "Unexpected instruction\n"
753+
abort()
753754
}
754755
}
755756

@@ -1138,11 +1139,13 @@ static SmallSetVector<AllocaInst *, 8> FindSretAllocas(Value* SRetArg) {
11381139
worklist.insert(FalseBranch);
11391140
} else {
11401141
llvm_dump(SI);
1141-
assert(false && "Malformed Select");
1142+
dbgs() << "Malformed Select\n";
1143+
abort;
11421144
}
11431145
} else {
11441146
llvm_dump(V);
1145-
assert(false && "Unexpected SRet argument");
1147+
dbgs() << "Unexpected SRet argument\n";
1148+
abort();
11461149
}
11471150
}
11481151
}
@@ -1221,7 +1224,8 @@ State LateLowerGCFrame::LocalScan(Function &F) {
12211224
SmallSetVector<AllocaInst *, 8> gc_allocas = FindSretAllocas(arg1);
12221225
if (gc_allocas.size() == 0) {
12231226
llvm_dump(CI);
1224-
assert(false && "Expected at least one alloca");
1227+
errs() << "Expected one Alloca at least\n";
1228+
abort();
12251229
}
12261230
else {
12271231
for (AllocaInst* SRet_gc : gc_allocas) {

0 commit comments

Comments
 (0)