Test CU directory is the work_dir

Make sure that we don't regress setting of the CU directory to the
working directory.
This commit is contained in:
Simonas Kazlauskas 2021-02-14 17:49:55 +02:00
parent 16c71886c9
commit a0e8103ea3

View file

@ -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]]