about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSimonas Kazlauskas <git@kazlauskas.me>2021-02-14 17:49:55 +0200
committerSimonas Kazlauskas <git@kazlauskas.me>2021-02-20 15:56:36 +0200
commita0e8103ea3648240af84e6960b2c3ba0b2b12f67 (patch)
treed71902d66fd19a8409a5864155cb08f0c0ffa138
parent16c71886c9ed143a22890f99c59deea37b157fa8 (diff)
downloadrust-a0e8103ea3648240af84e6960b2c3ba0b2b12f67.tar.gz
rust-a0e8103ea3648240af84e6960b2c3ba0b2b12f67.zip
Test CU directory is the work_dir
Make sure that we don't regress setting of the CU directory to the
working directory.
-rw-r--r--src/test/codegen/debug-compile-unit-path.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/codegen/debug-compile-unit-path.rs b/src/test/codegen/debug-compile-unit-path.rs
new file mode 100644
index 00000000000..fcb66e08576
--- /dev/null
+++ b/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]]