@@ -1166,7 +1166,11 @@ static AOTOutputs add_output_impl(Module &M, TargetMachine &SourceTM, ShardTimer
1166
1166
raw_svector_ostream OS (out.obj );
1167
1167
legacy::PassManager emitter;
1168
1168
addTargetPasses (&emitter, TM->getTargetTriple (), TM->getTargetIRAnalysis ());
1169
+ #if JL_LLVM_VERSION >= 180000
1170
+ if (TM->addPassesToEmitFile (emitter, OS, nullptr , CodeGenFileType::ObjectFile, false ))
1171
+ #else
1169
1172
if (TM->addPassesToEmitFile (emitter, OS, nullptr , CGFT_ObjectFile, false ))
1173
+ #endif
1170
1174
jl_safe_printf (" ERROR: target does not support generation of object files\n " );
1171
1175
emitter.run (M);
1172
1176
timers.obj .stopTimer ();
@@ -1177,7 +1181,7 @@ static AOTOutputs add_output_impl(Module &M, TargetMachine &SourceTM, ShardTimer
1177
1181
raw_svector_ostream OS (out.asm_ );
1178
1182
legacy::PassManager emitter;
1179
1183
addTargetPasses (&emitter, TM->getTargetTriple (), TM->getTargetIRAnalysis ());
1180
- if (TM->addPassesToEmitFile (emitter, OS, nullptr , CGFT_AssemblyFile , false ))
1184
+ if (TM->addPassesToEmitFile (emitter, OS, nullptr , CodeGenFileType::AssemblyFile , false ))
1181
1185
jl_safe_printf (" ERROR: target does not support generation of assembly files\n " );
1182
1186
emitter.run (M);
1183
1187
timers.asm_ .stopTimer ();
0 commit comments