diff options
| author | Celina G. Val <celinval@amazon.com> | 2023-08-30 16:50:07 -0700 |
|---|---|---|
| committer | Celina G. Val <celinval@amazon.com> | 2023-09-05 08:54:03 -0700 |
| commit | 2db01be5844ded1139eb4fb5f1434d0090b6ba38 (patch) | |
| tree | c66566e474d20296fd4c11caf216d347f9e85192 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | f222a2dd8f6391e6433f57a7c5f1514166edbec1 (diff) | |
| download | rust-2db01be5844ded1139eb4fb5f1434d0090b6ba38.tar.gz rust-2db01be5844ded1139eb4fb5f1434d0090b6ba38.zip | |
Adjust StableMIR interface to return and not crash
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 return value to the callback, because 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
