Mercurial > projects > ldc
comparison gen/toir.cpp @ 936:2ebac4750adb
Removed some dead code.
Fixed assertion filenames for imported template instances. Fixes #152 .
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 04 Feb 2009 02:10:23 +0100 |
parents | 5e3bb0c3ea8b |
children | d96471e8b5e5 |
comparison
equal
deleted
inserted
replaced
935:acd745fbdb66 | 936:2ebac4750adb |
---|---|
1766 // branch | 1766 // branch |
1767 llvm::BranchInst::Create(endbb, assertbb, condval, p->scopebb()); | 1767 llvm::BranchInst::Create(endbb, assertbb, condval, p->scopebb()); |
1768 | 1768 |
1769 // call assert runtime functions | 1769 // call assert runtime functions |
1770 p->scope() = IRScope(assertbb,endbb); | 1770 p->scope() = IRScope(assertbb,endbb); |
1771 DtoAssert(&loc, msg ? msg->toElem(p) : NULL); | 1771 DtoAssert(p->func()->decl->getModule(), &loc, msg ? msg->toElem(p) : NULL); |
1772 | 1772 |
1773 // rewrite the scope | 1773 // rewrite the scope |
1774 p->scope() = IRScope(endbb,oldend); | 1774 p->scope() = IRScope(endbb,oldend); |
1775 } | 1775 } |
1776 | 1776 |
1941 LOG_SCOPE; | 1941 LOG_SCOPE; |
1942 | 1942 |
1943 // FIXME: DMD inserts a trap here... we probably should as well !?! | 1943 // FIXME: DMD inserts a trap here... we probably should as well !?! |
1944 | 1944 |
1945 #if 1 | 1945 #if 1 |
1946 DtoAssert(&loc, NULL); | 1946 DtoAssert(p->func()->decl->getModule(), &loc, NULL); |
1947 #else | 1947 #else |
1948 // call the new (?) trap intrinsic | 1948 // call the new (?) trap intrinsic |
1949 p->ir->CreateCall(GET_INTRINSIC_DECL(trap),""); | 1949 p->ir->CreateCall(GET_INTRINSIC_DECL(trap),""); |
1950 new llvm::UnreachableInst(p->scopebb()); | 1950 new llvm::UnreachableInst(p->scopebb()); |
1951 #endif | 1951 #endif |