about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-08-29 16:21:47 +0200
committerGitHub <noreply@github.com>2024-08-29 16:21:47 +0200
commitd5c40d03dc0c31ac099992d1692003a130f4073d (patch)
tree0734a59b51d6c5bb40bcba16c8a7bff89dcd1104 /tests/codegen
parent4b08b2e400faaa5c4120658989a097fcf0ff2028 (diff)
parent9589eb95d2872337e932c8b5dc26bdb5cb3dc15b (diff)
downloadrust-d5c40d03dc0c31ac099992d1692003a130f4073d.tar.gz
rust-d5c40d03dc0c31ac099992d1692003a130f4073d.zip
Rollup merge of #128970 - DianQK:lint-llvm-ir, r=nikic
Add `-Zlint-llvm-ir`

This flag is similar to `-Zverify-llvm-ir` and allows us to lint the generated IR.

r? compiler
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/cast-target-abi.rs4
-rw-r--r--tests/codegen/cffi/ffi-out-of-bounds-loads.rs3
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/codegen/cast-target-abi.rs b/tests/codegen/cast-target-abi.rs
index 34e52d38bbe..db76aae3dd0 100644
--- a/tests/codegen/cast-target-abi.rs
+++ b/tests/codegen/cast-target-abi.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
 //@ revisions:aarch64 loongarch64 powerpc64 sparc64 x86_64
-// FIXME: Add `-Cllvm-args=--lint-abort-on-error` after LLVM 19
-//@ compile-flags: -O -C no-prepopulate-passes -C passes=lint
+//@ min-llvm-version: 19
+//@ compile-flags: -O -Cno-prepopulate-passes -Zlint-llvm-ir -Cllvm-args=-lint-abort-on-error
 
 //@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
 //@[aarch64] needs-llvm-components: arm
diff --git a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
index a4b7c0caa6d..ae8d8383f5b 100644
--- a/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
+++ b/tests/codegen/cffi/ffi-out-of-bounds-loads.rs
@@ -1,5 +1,6 @@
 //@ revisions: linux apple
-//@ compile-flags: -C opt-level=0 -C no-prepopulate-passes -C passes=lint
+//@ min-llvm-version: 19
+//@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes -Zlint-llvm-ir -Cllvm-args=-lint-abort-on-error
 
 //@[linux] compile-flags: --target x86_64-unknown-linux-gnu
 //@[linux] needs-llvm-components: x86