mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-10-15 17:17:00 +02:00
[svn r349] Fixed problems with static arrays of void as well as a static arrays with zero length.
Fixed issues with DMD generated assert statements when using class invariants, generally due to incomplete ASTs. Removed some dead code. Added a few comments.
This commit is contained in:
+2
-15
@@ -732,22 +732,9 @@ void DtoDefineFunc(FuncDeclaration* fd)
|
||||
// if the last block is empty now, it must be unreachable or it's a bug somewhere else
|
||||
// would be nice to figure out how to assert that this is correct
|
||||
llvm::BasicBlock* lastbb = &func->getBasicBlockList().back();
|
||||
if (lastbb->empty()) {
|
||||
if (lastbb->empty())
|
||||
{
|
||||
new llvm::UnreachableInst(lastbb);
|
||||
// if (llvm::pred_begin(lastbb) != llvm::pred_end(lastbb))
|
||||
// {
|
||||
// Logger::println("Erasing lastbb");
|
||||
// lastbb->eraseFromParent();
|
||||
// }
|
||||
// else {
|
||||
// new llvm::UnreachableInst(lastbb);
|
||||
// // if (func->getReturnType() == LLType::VoidTy) {
|
||||
// // llvm::ReturnInst::Create(lastbb);
|
||||
// // }
|
||||
// // else {
|
||||
// // llvm::ReturnInst::Create(llvm::UndefValue::get(func->getReturnType()), lastbb);
|
||||
// // }
|
||||
// }
|
||||
}
|
||||
|
||||
// if the last block is not terminated we return a null value or void
|
||||
|
||||
Reference in New Issue
Block a user