about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-05 20:15:02 +0200
committerGitHub <noreply@github.com>2023-09-05 20:15:02 +0200
commitc7d5c12cc87d9df08c1a04ea5c9045b53569b7ae (patch)
treef7779061ef3bde3d43d78f79d0899d360b732136 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent14c57f1adb9b1bbd643ab20a2ec256362f145022 (diff)
parentd10d8290ac50b5ea8c0ca72bf216cf414b2ada24 (diff)
downloadrust-c7d5c12cc87d9df08c1a04ea5c9045b53569b7ae.tar.gz
rust-c7d5c12cc87d9df08c1a04ea5c9045b53569b7ae.zip
Rollup merge of #115397 - celinval:smir-interface, r=oli-obk
Add support to return value in StableMIR interface and not crash due to compilation error

Invoking `StableMir::run()` on a crate that has any compilation error was crashing the entire process. Instead, return a `CompilerError` so the user knows compilation did not succeed. I believe ICE will also be converted to `CompilerError`.

I'm also adding a possibility for the callback to return a value. I think it will be handy for users (at least it was for my current task of implementing a tool to validate stable-mir). However, if people disagree, I can remove that.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions