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