@@ -15,7 +15,7 @@ use crate::maybe_pqp_cg_ssa as rustc_codegen_ssa;
15
15
16
16
use itertools:: Itertools as _;
17
17
use rspirv:: dr:: { Module , Operand } ;
18
- use rspirv:: spirv:: { Decoration , LinkageType , Op , Word } ;
18
+ use rspirv:: spirv:: { Decoration , LinkageType , Word } ;
19
19
use rustc_abi:: { AddressSpace , HasDataLayout , TargetDataLayout } ;
20
20
use rustc_ast:: ast:: { InlineAsmOptions , InlineAsmTemplatePiece } ;
21
21
use rustc_codegen_ssa:: mir:: debuginfo:: { FunctionDebugContext , VariableKind } ;
@@ -37,7 +37,7 @@ use rustc_target::spec::{HasTargetSpec, Target, TargetTuple};
37
37
use std:: cell:: RefCell ;
38
38
use std:: collections:: BTreeSet ;
39
39
use std:: iter:: once;
40
- use std:: path:: { Path , PathBuf } ;
40
+ use std:: path:: PathBuf ;
41
41
use std:: rc:: Rc ;
42
42
use std:: str:: FromStr ;
43
43
@@ -767,25 +767,6 @@ impl CodegenArgs {
767
767
768
768
if self . disassemble_globals {
769
769
for inst in module. global_inst_iter ( ) {
770
- // HACK: On Windows, paths are printed like `OpString "D:\\dir\\blah"`.
771
- // Unfortunately, compiletest will only normalize `D:\dir\blah` to `$DIR/blah` -
772
- // one backslash, not two. So, when disassembling for compiletest, check if the
773
- // argument to OpString can be parsed as an absolute path, and if it is, replace it
774
- // with just the filename component of the path.
775
- if inst. class . opcode == Op :: String {
776
- let path = Path :: new ( inst. operands [ 0 ] . unwrap_literal_string ( ) ) ;
777
- if path. is_absolute ( )
778
- && let Some ( file_name) = path. file_name ( )
779
- {
780
- let mut inst = inst. clone ( ) ;
781
- inst. operands [ 0 ] = Operand :: LiteralString ( format ! (
782
- "$OPSTRING_FILENAME/{}" ,
783
- file_name. to_string_lossy( ) ,
784
- ) ) ;
785
- eprintln ! ( "{}" , inst. disassemble( ) ) ;
786
- continue ;
787
- }
788
- }
789
770
eprintln ! ( "{}" , inst. disassemble( ) ) ;
790
771
}
791
772
}
0 commit comments