about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-27 11:48:07 +0200
committerGitHub <noreply@github.com>2023-10-27 11:48:07 +0200
commit33744804fe1882ef986c9cc76638fff3b97c593a (patch)
tree43fceb5b8c540559fb0a67b8e91568dc90a0a0af /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent5459333ffc4a0838b59a7576b68f27f7cad2970a (diff)
parent613e6181a66e572abd7b980931d08c74c480967d (diff)
downloadrust-33744804fe1882ef986c9cc76638fff3b97c593a.tar.gz
rust-33744804fe1882ef986c9cc76638fff3b97c593a.zip
Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk
Create a new ConstantKind variant (ZeroSized) for StableMIR

ZeroSized constants can be represented as `mir::Const::Val` even if their layout is not yet known. In those cases, CrateItem::body() was crashing when trying to convert a `ConstValue::ZeroSized` into its stable counterpart  `ConstantKind::Allocated`.

Instead, we now map `ConstValue::ZeroSized` into a new variant: `ConstantKind::ZeroSized`.

**Note:** I didn't add any new test here since we already have covering tests in our project repository which I manually confirmed that will fix the issue.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions