File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ function add_parameter_address_spaces!(@nospecialize(job::CompilerJob), mod::LLV
238238
239239 # find the byref parameters
240240 byref = BitVector (undef, length (parameters (ft)))
241- args = classify_arguments (job, ft; post_optimization= true )
241+ args = classify_arguments (job, ft; post_optimization= job . config . optimize )
242242 filter! (args) do arg
243243 arg. cc != GHOST
244244 end
@@ -563,11 +563,15 @@ function add_argument_metadata!(@nospecialize(job::CompilerJob), mod::LLVM.Modul
563563 arg_infos = Metadata[]
564564
565565 # Iterate through arguments and create metadata for them
566- args = classify_arguments (job, entry_ft; post_optimization= true )
566+ args = classify_arguments (job, entry_ft; post_optimization= job . config . optimize )
567567 i = 1
568568 for arg in args
569569 arg. idx === nothing && continue
570- @assert parameters (entry_ft)[arg. idx] isa LLVM. PointerType
570+ if job. config. optimize
571+ @assert parameters (entry_ft)[arg. idx] isa LLVM. PointerType
572+ else
573+ parameters (entry_ft)[arg. idx] isa LLVM. PointerType || continue
574+ end
571575
572576 # NOTE: we emit the bare minimum of argument metadata to support
573577 # bindless argument encoding. Actually using the argument encoder
You can’t perform that action at this time.
0 commit comments