-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc: selectively trans branches for
if <literal-bool>
.
That is, the `b` branch in `if true { a } else { b }` will not be trans'd, and that expression will be exactly the same as `a`. This means that, for example, macros conditionally expanding to `if false { .. }` (like debug!) will not waste time in LLVM (or trans).
- Loading branch information
Showing
1 changed file
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4797dd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from graydon
at huonw@4797dd4
4797dd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging huonw/rust/cond-debug = 4797dd4 into auto
4797dd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huonw/rust/cond-debug = 4797dd4 merged ok, testing candidate = ad212ec
4797dd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/424
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/426
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt/builds/429
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt-vg/builds/422
success: http://buildbot.rust-lang.org/builders/auto-mac-all-opt/builds/426
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/444
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt/builds/447
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/444
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt/builds/448
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt-vg/builds/451
success: http://buildbot.rust-lang.org/builders/auto-linux-all-opt/builds/444
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/428
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt/builds/444
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/223
4797dd4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = ad212ec