@@ -984,7 +984,7 @@ static AOTOutputs add_output_impl(Module &M, TargetMachine &SourceTM, ShardTimer
984984 if (!opt && !obj && !asm_) {
985985 return out;
986986 }
987- assert (!verifyModule (M, & errs () ));
987+ assert (!verifyLLVMIR (M ));
988988
989989 timers.optimize .startTimer ();
990990
@@ -1007,7 +1007,7 @@ static AOTOutputs add_output_impl(Module &M, TargetMachine &SourceTM, ShardTimer
10071007 NewPM optimizer{std::move (PMTM), getOptLevel (jl_options.opt_level ), OptimizationOptions::defaults (true , true )};
10081008#endif
10091009 optimizer.run (M);
1010- assert (!verifyModule (M, & errs () ));
1010+ assert (!verifyLLVMIR (M ));
10111011 bool inject_aliases = false ;
10121012 for (auto &F : M.functions ()) {
10131013 if (!F.isDeclaration () && F.getName () != " _DllMainCRTStartup" ) {
@@ -1077,7 +1077,7 @@ static AOTOutputs add_output_impl(Module &M, TargetMachine &SourceTM, ShardTimer
10771077
10781078// serialize module to bitcode
10791079static auto serializeModule (const Module &M) {
1080- assert (!verifyModule (M, & errs () ) && " Serializing invalid module!" );
1080+ assert (!verifyLLVMIR (M ) && " Serializing invalid module!" );
10811081 SmallVector<char , 0 > ClonedModuleBuffer;
10821082 BitcodeWriter BCWriter (ClonedModuleBuffer);
10831083 BCWriter.writeModule (M);
@@ -2108,7 +2108,7 @@ void jl_get_llvmf_defn_impl(jl_llvmf_dump_t* dump, jl_method_instance_t *mi, siz
21082108 // and will better match what's actually in sysimg.
21092109 for (auto &global : output.globals )
21102110 global.second ->setLinkage (GlobalValue::ExternalLinkage);
2111- assert (!verifyModule (*m.getModuleUnlocked (), & errs ()));
2111+ assert (!verifyLLVMIR (*m.getModuleUnlocked ()));
21122112 if (optimize) {
21132113#ifndef JL_USE_NEW_PM
21142114 legacy::PassManager PM;
@@ -2120,7 +2120,7 @@ void jl_get_llvmf_defn_impl(jl_llvmf_dump_t* dump, jl_method_instance_t *mi, siz
21202120#endif
21212121 // Safe b/c context lock is held by output
21222122 PM.run (*m.getModuleUnlocked ());
2123- assert (!verifyModule (*m.getModuleUnlocked (), & errs ()));
2123+ assert (!verifyLLVMIR (*m.getModuleUnlocked ()));
21242124 }
21252125 const std::string *fname;
21262126 if (decls.functionObject == " jl_fptr_args" || decls.functionObject == " jl_fptr_sparam" )
0 commit comments