about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2019-01-23 16:32:59 -0500
committerAaron Hill <aa1ronham@gmail.com>2019-01-23 16:32:59 -0500
commitfc0c8839f7a4b5a4f8ee4c9c8177fb0ecfb0e5de (patch)
tree3f79ed4f72f1f19bf450b01dd076cce01e56b412 /src/rustllvm/RustWrapper.cpp
parent19f8958f827e379be9b0ffc93fca580ec8ffac77 (diff)
downloadrust-fc0c8839f7a4b5a4f8ee4c9c8177fb0ecfb0e5de.tar.gz
rust-fc0c8839f7a4b5a4f8ee4c9c8177fb0ecfb0e5de.zip
Don't ICE when logging unusual types
MonoItemExt#to_string is used for both debug logging and LLVM symbol
name generation. When debugging, we want to print out any type we
encounter, even if it's something weird like GeneratorWitness. However,
during codegen, we still want to error if we encounter an unexpected
type when generating a name.

To resolve this issue, this commit introduces a new 'debug' parameter to
the relevant methods. When set to 'true', it allows any type to be
printed - when set to 'false', it 'bug!'s when encountering an
unexpected type.

This prevents an ICE when enabling debug logging (via RUST_LOG) while
running rustc on generator-related code.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions