about summary refs log tree commit diff
path: root/src/doc
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 /src/doc
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 'src/doc')
-rw-r--r--src/doc/unstable-book/src/compiler-flags/lint-llvm-ir.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/lint-llvm-ir.md b/src/doc/unstable-book/src/compiler-flags/lint-llvm-ir.md
new file mode 100644
index 00000000000..7b99c25a694
--- /dev/null
+++ b/src/doc/unstable-book/src/compiler-flags/lint-llvm-ir.md
@@ -0,0 +1,7 @@
+# `lint-llvm-ir`
+
+---------------------
+
+This flag will add `LintPass` to the start of the pipeline.
+You can use it to check for common errors in the LLVM IR generated by `rustc`.
+You can add `-Cllvm-args=-lint-abort-on-error` to abort the process if errors were found.