@@ -901,17 +901,14 @@ pub(crate) unsafe fn codegen(
901
901
. generic_activity_with_arg ( "LLVM_module_codegen_emit_obj" , & module. name [ ..] ) ;
902
902
903
903
let dwo_out = cgcx. output_filenames . temp_path_dwo ( module_name) ;
904
- let dwo_out = match cgcx. split_debuginfo {
905
- // Don't change how DWARF is emitted in single mode (or when disabled).
906
- SplitDebuginfo :: Off | SplitDebuginfo :: Packed => None ,
904
+ let dwo_out = if cgcx. target_can_use_split_dwarf
905
+ && cgcx . split_debuginfo != SplitDebuginfo :: Off
906
+ {
907
907
// Emit (a subset of the) DWARF into a separate file in split mode.
908
- SplitDebuginfo :: Unpacked => {
909
- if cgcx. target_can_use_split_dwarf {
910
- Some ( dwo_out. as_path ( ) )
911
- } else {
912
- None
913
- }
914
- }
908
+ Some ( dwo_out. as_path ( ) )
909
+ } else {
910
+ // Don't change how DWARF is emitted in single mode (or when disabled).
911
+ None
915
912
} ;
916
913
917
914
with_codegen ( tm, llmod, config. no_builtins , |cpm| {
@@ -948,7 +945,7 @@ pub(crate) unsafe fn codegen(
948
945
949
946
Ok ( module. into_compiled_module (
950
947
config. emit_obj != EmitObj :: None ,
951
- cgcx. target_can_use_split_dwarf && cgcx. split_debuginfo == SplitDebuginfo :: Unpacked ,
948
+ cgcx. target_can_use_split_dwarf && cgcx. split_debuginfo != SplitDebuginfo :: Off ,
952
949
config. emit_bc ,
953
950
& cgcx. output_filenames ,
954
951
) )
0 commit comments