about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-25 01:37:03 +0100
committerGitHub <noreply@github.com>2019-01-25 01:37:03 +0100
commita6fa7de8e7e06b132ecda6945746a416a972c763 (patch)
treeed703bb2e268afcba45781c78f06fce045a0c086 /src/rustllvm/RustWrapper.cpp
parenta9950f6a459b88ea7424724849f79ce3720e94e4 (diff)
parentfc0c8839f7a4b5a4f8ee4c9c8177fb0ecfb0e5de (diff)
downloadrust-a6fa7de8e7e06b132ecda6945746a416a972c763.tar.gz
rust-a6fa7de8e7e06b132ecda6945746a416a972c763.zip
Rollup merge of #57865 - Aaron1011:fix/debug-ice, r=estebank
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