Skip to content

Commit ee0b444

Browse files
committed
---
yaml --- r: 147609 b: refs/heads/try2 c: 558099b h: refs/heads/master i: 147607: a22a1e5 v: v3
1 parent 26bd0f9 commit ee0b444

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 13e1bf1881f2523edd315a73412f74339a2168db
8+
refs/heads/try2: 558099b5093b9094d13b99e5bec4e71a8f02e01f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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)