]> git.lizzy.rs Git - rust.git/commitdiff
Test that column information is not emitted for MSVC targets
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Tue, 25 Feb 2020 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Wed, 26 Feb 2020 20:45:34 +0000 (21:45 +0100)
src/test/codegen/debug-column-msvc.rs [new file with mode: 0644]

diff --git a/src/test/codegen/debug-column-msvc.rs b/src/test/codegen/debug-column-msvc.rs
new file mode 100644 (file)
index 0000000..aad8b37
--- /dev/null
@@ -0,0 +1,16 @@
+// Verify that no column information is emitted for MSVC targets
+//
+// only-msvc
+// compile-flags: -C debuginfo=2
+
+// CHECK-NOT: !DILexicalBlock({{.*}}column: {{.*}})
+// CHECK-NOT: !DILocation({{.*}}column: {{.*}})
+
+pub fn add(a: u32, b: u32) -> u32 {
+    a + b
+}
+
+fn main() {
+    let c = add(1, 2);
+    println!("{}", c);
+}