Skip to content

Commit c3cd9ee

Browse files
committed
---
yaml --- r: 94657 b: refs/heads/try c: 558099b h: refs/heads/master i: 94655: 72a5da8 v: v3
1 parent c46172c commit c3cd9ee

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 13e1bf1881f2523edd315a73412f74339a2168db
5+
refs/heads/try: 558099b5093b9094d13b99e5bec4e71a8f02e01f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/trans/debuginfo.rs

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -222,21 +222,6 @@ impl FunctionDebugContext {
222222
}
223223
}
224224

225-
fn get_mut_ref<'a>(&'a mut self,
226-
cx: &CrateContext,
227-
span: Span)
228-
-> &'a mut FunctionDebugContextData {
229-
match *self {
230-
FunctionDebugContext(~ref mut data) => data,
231-
DebugInfoDisabled => {
232-
cx.sess.span_bug(span, FunctionDebugContext::debuginfo_disabled_message());
233-
}
234-
FunctionWithoutDebugInfo => {
235-
cx.sess.span_bug(span, FunctionDebugContext::should_be_ignored_message());
236-
}
237-
}
238-
}
239-
240225
fn debuginfo_disabled_message() -> &'static str {
241226
"debuginfo: Error trying to access FunctionDebugContext although debug info is disabled!"
242227
}
@@ -459,7 +444,7 @@ pub fn create_self_argument_metadata(bcx: @Block,
459444
let scope_metadata = bcx.fcx.debug_context.get_ref(bcx.ccx(), span).fn_metadata;
460445

461446
let argument_index = {
462-
let counter = &mut bcx.fcx.debug_context.get_mut_ref(bcx.ccx(), span).argument_counter;
447+
let counter = &bcx.fcx.debug_context.get_ref(bcx.ccx(), span).argument_counter;
463448
let argument_index = counter.get();
464449
counter.set(argument_index + 1);
465450
argument_index
@@ -538,7 +523,7 @@ pub fn create_argument_metadata(bcx: @Block,
538523
let argument_ident = ast_util::path_to_ident(path_ref);
539524

540525
let argument_index = {
541-
let counter = &fcx.debug_context.get_mut_ref(cx, span).argument_counter;
526+
let counter = &fcx.debug_context.get_ref(cx, span).argument_counter;
542527
let argument_index = counter.get();
543528
counter.set(argument_index + 1);
544529
argument_index
@@ -596,9 +581,9 @@ pub fn clear_source_location(fcx: &FunctionContext) {
596581
/// when beginning to translate a new function. This functions switches source location emitting on
597582
/// and must therefore be called before the first real statement/expression of the function is
598583
/// translated.
599-
pub fn start_emitting_source_locations(fcx: &mut FunctionContext) {
584+
pub fn start_emitting_source_locations(fcx: &FunctionContext) {
600585
match fcx.debug_context {
601-
FunctionDebugContext(~ref mut data) => {
586+
FunctionDebugContext(~ref data) => {
602587
data.source_locations_enabled.set(true)
603588
},
604589
_ => { /* safe to ignore */ }

0 commit comments

Comments
 (0)