codegen_llvm: improve common patterns

This commit is contained in:
ljedrz 2018-10-08 16:58:26 +02:00
parent cd41765851
commit 0af79143ae
8 changed files with 86 additions and 115 deletions

View file

@ -94,9 +94,8 @@ pub fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
// Currently stack probes seem somewhat incompatible with the address
// sanitizer. With asan we're already protected from stack overflow anyway
// so we don't really need stack probes regardless.
match cx.sess().opts.debugging_opts.sanitizer {
Some(Sanitizer::Address) => return,
_ => {}
if let Some(Sanitizer::Address) = cx.sess().opts.debugging_opts.sanitizer {
return
}
// probestack doesn't play nice either with pgo-gen.