comparison gen/toir.cpp @ 1142:49421d3ac5a7

Automated merge with http://hg.dsource.org/projects/ldc
author Christian Kamm <kamm incasoftware de>
date Tue, 24 Mar 2009 21:18:29 +0100
parents f99a3b393c03
children 1860414bf3b7
comparison
equal deleted inserted replaced
1140:946fad6c96a1 1142:49421d3ac5a7
1781 // branch 1781 // branch
1782 llvm::BranchInst::Create(endbb, assertbb, condval, p->scopebb()); 1782 llvm::BranchInst::Create(endbb, assertbb, condval, p->scopebb());
1783 1783
1784 // call assert runtime functions 1784 // call assert runtime functions
1785 p->scope() = IRScope(assertbb,endbb); 1785 p->scope() = IRScope(assertbb,endbb);
1786 DtoAssert(p->func()->decl->getModule(), &loc, msg ? msg->toElem(p) : NULL); 1786 DtoAssert(p->func()->decl->getModule(), loc, msg ? msg->toElem(p) : NULL);
1787 1787
1788 // rewrite the scope 1788 // rewrite the scope
1789 p->scope() = IRScope(endbb,oldend); 1789 p->scope() = IRScope(endbb,oldend);
1790 } 1790 }
1791 1791
1956 LOG_SCOPE; 1956 LOG_SCOPE;
1957 1957
1958 // FIXME: DMD inserts a trap here... we probably should as well !?! 1958 // FIXME: DMD inserts a trap here... we probably should as well !?!
1959 1959
1960 #if 1 1960 #if 1
1961 DtoAssert(p->func()->decl->getModule(), &loc, NULL); 1961 DtoAssert(p->func()->decl->getModule(), loc, NULL);
1962 #else 1962 #else
1963 // call the new (?) trap intrinsic 1963 // call the new (?) trap intrinsic
1964 p->ir->CreateCall(GET_INTRINSIC_DECL(trap),""); 1964 p->ir->CreateCall(GET_INTRINSIC_DECL(trap),"");
1965 new llvm::UnreachableInst(p->scopebb()); 1965 new llvm::UnreachableInst(p->scopebb());
1966 #endif 1966 #endif