summaryrefslogtreecommitdiffstats
path: root/tests/codegen/split-lto-unit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/split-lto-unit.rs')
-rw-r--r--tests/codegen/split-lto-unit.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/codegen/split-lto-unit.rs b/tests/codegen/split-lto-unit.rs
new file mode 100644
index 000000000..dc6570be3
--- /dev/null
+++ b/tests/codegen/split-lto-unit.rs
@@ -0,0 +1,11 @@
+// Verifies that "EnableSplitLTOUnit" module flag is added.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
+
+#![crate_type="lib"]
+
+pub fn foo() {
+}
+
+// CHECK: !{{[0-9]+}} = !{i32 4, !"EnableSplitLTOUnit", i32 1}