summary refs log tree commit diff
path: root/tests/codegen-llvm/enable-lto-unit-splitting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen-llvm/enable-lto-unit-splitting.rs')
-rw-r--r--tests/codegen-llvm/enable-lto-unit-splitting.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/codegen-llvm/enable-lto-unit-splitting.rs b/tests/codegen-llvm/enable-lto-unit-splitting.rs
new file mode 100644
index 00000000000..51c2671bc4e
--- /dev/null
+++ b/tests/codegen-llvm/enable-lto-unit-splitting.rs
@@ -0,0 +1,9 @@
+// Verifies that "EnableSplitLTOUnit" module flag is added.
+//
+//@ compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
+
+#![crate_type = "lib"]
+
+pub fn foo() {}
+
+// CHECK: !{{[0-9]+}} = !{i32 4, !"EnableSplitLTOUnit", i32 1}