Mercurial > projects > ldc
comparison gen/toir.cpp @ 1141:f99a3b393c03
Reorganize EnclosingHandlers to require less changes to the frontend and allow us to
implement the synchronized storage class for functions.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 24 Mar 2009 21:18:18 +0100 |
parents | 9d308feaec27 |
children | 1860414bf3b7 |
comparison
equal
deleted
inserted
replaced
1137:45d73f0a9b43 | 1141:f99a3b393c03 |
---|---|
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 |