File tree Expand file tree Collapse file tree 2 files changed +34
-5
lines changed
src/test/codegen/remap_path_prefix Expand file tree Collapse file tree 2 files changed +34
-5
lines changed Original file line number Diff line number Diff line change 1010
1111// ignore-tidy-linelength
1212
13- // compile-flags: -g -Zremap-path-prefix-from={{cwd}} -Zremap-path-prefix-to=/the/cwd -Zremap-path-prefix-from={{src-base}} -Zremap-path-prefix-to=/the/src
13+ // compile-flags: -g -Zremap-path-prefix-from={{cwd}} -Zremap-path-prefix-to=/the/aux- cwd -Zremap-path-prefix-from={{src-base}}/remap_path_prefix/auxiliary -Zremap-path-prefix-to=/the/aux- src
1414
15- // CHECK: !DIFile(filename: "/the/src/remap_path_prefix.rs", directory: "/the/cwd")
16-
17- fn main ( ) {
18- // We just check that the DIFile got remapped properly.
15+ #[ inline]
16+ pub fn some_aux_function ( ) -> i32 {
17+ 1234
1918}
Original file line number Diff line number Diff line change 1+ // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+ // file at the top-level directory of this distribution and at
3+ // http://rust-lang.org/COPYRIGHT.
4+ //
5+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+ // option. This file may not be copied, modified, or distributed
9+ // except according to those terms.
10+
11+ // ignore-tidy-linelength
12+
13+ // compile-flags: -g -C no-prepopulate-passes -Zremap-path-prefix-from={{cwd}} -Zremap-path-prefix-to=/the/cwd -Zremap-path-prefix-from={{src-base}} -Zremap-path-prefix-to=/the/src
14+ // aux-build:remap_path_prefix_aux.rs
15+
16+ extern crate remap_path_prefix_aux;
17+
18+ // Here we check that the expansion of the file!() macro is mapped.
19+ // CHECK: internal constant [34 x i8] c"/the/src/remap_path_prefix/main.rs"
20+ pub static FILE_PATH : & ' static str = file ! ( ) ;
21+
22+ fn main ( ) {
23+ remap_path_prefix_aux:: some_aux_function ( ) ;
24+ }
25+
26+ // Here we check that local debuginfo is mapped correctly.
27+ // CHECK: !DIFile(filename: "/the/src/remap_path_prefix/main.rs", directory: "/the/cwd")
28+
29+ // And here that debuginfo from other crates are expanded to absolute paths.
30+ // CHECK: !DIFile(filename: "/the/aux-src/remap_path_prefix_aux.rs", directory: "")
You can’t perform that action at this time.
0 commit comments