Mercurial > projects > ldc
diff gen/llvmhelpers.cpp @ 291:068cb3c60afb trunk
[svn r312] Changed assert codegen to insert an unreachable terminator after the call to the assert function, which currently calls abort().
Changed array comparison runtime support to pass the array typeinfo instead of the element typeinfo. This allows a cleaner and faster implementation.
author | lindquist |
---|---|
date | Sat, 21 Jun 2008 21:16:26 +0200 |
parents | ebaf65fc4726 |
children | 94435b0ab2dd |
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp Sat Jun 21 17:57:36 2008 +0200 +++ b/gen/llvmhelpers.cpp Sat Jun 21 21:16:26 2008 +0200 @@ -98,6 +98,7 @@ llvm::PAListPtr palist; int idx = 1; + // FIXME: every assert creates a global for the filename !!! c = DtoConstString(loc->filename); // msg param @@ -144,6 +145,9 @@ // call llvm::CallInst* call = llvm::CallInst::Create(fn, args.begin(), args.end(), "", gIR->scopebb()); call->setParamAttrs(palist); + + // after assert is always unreachable + gIR->ir->CreateUnreachable(); } /****************************************************************************************/