Loading src/passes/startFromFailedAssert.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -175,11 +175,11 @@ void processAssertsInFunction(ModuleBundle& mod, Function* origF, FunctionBundle void addNewMain(ModuleBundle& mod, Function* badMain) { mod.newMain = mod.functionsBuilder.getMain(); auto* mainBB = BasicBlock::Create(mod.origModule.getContext(), "", mod.newMain); if (badMain) { auto* mainBB = BasicBlock::Create(mod.origModule.getContext(), "", mod.newMain); IRBuilder<> builder(mainBB); if (badMain) { if (badMain->arg_empty()) { builder.CreateCall(badMain); } Loading @@ -189,13 +189,13 @@ void addNewMain(ModuleBundle& mod, Function* badMain) auto* nondet = builder.CreateCall(nondetGenerator); builder.CreateCall(badMain, {nondet}); } } // if no bad main exists, that means no asserts were found // -> we can just create an empty main auto* zero = ConstantInt::get(Type::getInt32Ty(mod.revModule.getContext()), 0); builder.CreateRet(zero); } // if no bad main exists, that means no asserts were found // -> just leave the main that already exists in the module } void startFromFailedAssert(ModuleBundle& mod) { Loading Loading
src/passes/startFromFailedAssert.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -175,11 +175,11 @@ void processAssertsInFunction(ModuleBundle& mod, Function* origF, FunctionBundle void addNewMain(ModuleBundle& mod, Function* badMain) { mod.newMain = mod.functionsBuilder.getMain(); auto* mainBB = BasicBlock::Create(mod.origModule.getContext(), "", mod.newMain); if (badMain) { auto* mainBB = BasicBlock::Create(mod.origModule.getContext(), "", mod.newMain); IRBuilder<> builder(mainBB); if (badMain) { if (badMain->arg_empty()) { builder.CreateCall(badMain); } Loading @@ -189,13 +189,13 @@ void addNewMain(ModuleBundle& mod, Function* badMain) auto* nondet = builder.CreateCall(nondetGenerator); builder.CreateCall(badMain, {nondet}); } } // if no bad main exists, that means no asserts were found // -> we can just create an empty main auto* zero = ConstantInt::get(Type::getInt32Ty(mod.revModule.getContext()), 0); builder.CreateRet(zero); } // if no bad main exists, that means no asserts were found // -> just leave the main that already exists in the module } void startFromFailedAssert(ModuleBundle& mod) { Loading