Skip to content

Commit

Permalink
Test CU directory is the work_dir
Browse files Browse the repository at this point in the history
Make sure that we don't regress setting of the CU directory to the
working directory.
  • Loading branch information
nagisa committed Feb 20, 2021
1 parent 16c7188 commit a0e8103
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/codegen/debug-compile-unit-path.rs
@@ -0,0 +1,9 @@
// compile-flags: -g --remap-path-prefix={{cwd}}=/cwd/ --remap-path-prefix={{src-base}}=/base/
// ignore-tidy-linelength
//
// Ensure that we remap the compile unit directory and that we set it to the compilers current
// working directory and not something else.
#![crate_type="rlib"]

// CHECK-DAG: [[FILE:![0-9]*]] = !DIFile(filename: "/base/debug-compile-unit-path.rs{{.*}}", directory: "/cwd/")
// CHECK-DAG: {{![0-9]*}} = distinct !DICompileUnit({{.*}}file: [[FILE]]

0 comments on commit a0e8103

Please sign in to comment.