Skip to content

Commit 7680f50

Browse files
committedJul 23, 2012
Merge pull request #2998 from elliottslaughter/no-landing-pads
Add debug flag to turn off landing pads.
2 parents df4db83 + d8c75cf commit 7680f50

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed
 

‎src/rustc/driver/session.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const coherence: uint = 512u;
3939
const borrowck_stats: uint = 1024u;
4040
const borrowck_note_pure: uint = 2048;
4141
const borrowck_note_loan: uint = 4096;
42+
const no_landing_pads: uint = 8192;
4243

4344
fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
4445
~[(~"ppregions", ~"prettyprint regions with \
@@ -58,7 +59,9 @@ fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
5859
(~"borrowck-note-pure", ~"note where purity is req'd",
5960
borrowck_note_pure),
6061
(~"borrowck-note-loan", ~"note where loans are req'd",
61-
borrowck_note_loan)
62+
borrowck_note_loan),
63+
(~"no-landing-pads", ~"omit landing pads for unwinding",
64+
no_landing_pads)
6265
]
6366
}
6467

‎src/rustc/middle/trans/base.rs

+4
Original file line numberDiff line numberDiff line change
@@ -3224,6 +3224,10 @@ fn invoke(bcx: block, llfn: ValueRef, llargs: ~[ValueRef]) -> block {
32243224
}
32253225

32263226
fn need_invoke(bcx: block) -> bool {
3227+
if (bcx.ccx().sess.opts.debugging_opts & session::no_landing_pads != 0) {
3228+
ret false;
3229+
}
3230+
32273231
if have_cached_lpad(bcx) {
32283232
ret true;
32293233
}

0 commit comments

Comments
 (0)
Please sign in to comment.