Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions gen/toir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2446,15 +2446,8 @@ DValue* HaltExp::toElem(IRState* p)
Logger::print("HaltExp::toElem: %s\n", toChars());
LOG_SCOPE;

// FIXME: DMD inserts a trap here... we probably should as well !?!

#if 1
DtoAssert(p->func()->decl->getModule(), loc, NULL);
#else
// call the new (?) trap intrinsic
p->ir->CreateCall(GET_INTRINSIC_DECL(trap),"");
new llvm::UnreachableInst(p->scopebb());
#endif
p->ir->CreateCall(GET_INTRINSIC_DECL(trap), "");
p->ir->CreateUnreachable();

// this terminated the basicblock, start a new one
// this is sensible, since someone might goto behind the assert
Expand Down