about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-04-25 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-04-25 00:00:00 +0000
commiteaddc8febd02ca0b0cbd0fa08b8b752cb347b725 (patch)
tree27af9529b537286e91ee3b34195e8d86b6ad21c3 /compiler/rustc_codegen_llvm/src
parent13a2615883aa28433383a723a764ca9acb43fd48 (diff)
downloadrust-eaddc8febd02ca0b0cbd0fa08b8b752cb347b725.tar.gz
rust-eaddc8febd02ca0b0cbd0fa08b8b752cb347b725.zip
Reachable statics have reachable initializers
Static initializer can read other statics. Initializers are evaluated at
compile time, and so their content could become inlined into another
crate. Ensure that initializers of reachable statics are also reachable.

Previously, when an item incorrectly considered to be unreachable was
reached from another crate an attempt would be made to codegen it. The
attempt could fail with an ICE (in the case MIR wasn't available to do
so) in some circumstances the attempt could also succeed resulting in
a local codegen of non-local items, including static ones.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions