summaryrefslogtreecommitdiffstats
path: root/tests/codegen/enable-lto-unit-splitting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/enable-lto-unit-splitting.rs')
-rw-r--r--tests/codegen/enable-lto-unit-splitting.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/codegen/enable-lto-unit-splitting.rs b/tests/codegen/enable-lto-unit-splitting.rs
new file mode 100644
index 000000000..7daa05f69
--- /dev/null
+++ b/tests/codegen/enable-lto-unit-splitting.rs
@@ -0,0 +1,10 @@
+// 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}