about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorDianQK <dianqk@dianqk.net>2024-08-29 18:12:31 +0800
committerDianQK <dianqk@dianqk.net>2024-08-29 18:12:31 +0800
commit9589eb95d2872337e932c8b5dc26bdb5cb3dc15b (patch)
treee711a79c37a3af29fc2f9479b788dfe57f6321a9 /compiler/rustc_codegen_llvm/src
parentc9bd03cb724e13cca96ad320733046cbdb16fbbe (diff)
downloadrust-9589eb95d2872337e932c8b5dc26bdb5cb3dc15b.tar.gz
rust-9589eb95d2872337e932c8b5dc26bdb5cb3dc15b.zip
Add `-Zlint-llvm-ir`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs1
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index a1f2433ab6f..f747f313926 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -573,6 +573,7 @@ pub(crate) unsafe fn llvm_optimize(
             cgcx.opts.cg.linker_plugin_lto.enabled(),
             config.no_prepopulate_passes,
             config.verify_llvm_ir,
+            config.lint_llvm_ir,
             using_thin_buffers,
             config.merge_functions,
             unroll_loops,
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index 80b13c0e1d4..579ec517cf0 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -2217,6 +2217,7 @@ extern "C" {
         IsLinkerPluginLTO: bool,
         NoPrepopulatePasses: bool,
         VerifyIR: bool,
+        LintIR: bool,
         UseThinLTOBuffers: bool,
         MergeFunctions: bool,
         UnrollLoops: bool,