Skip to content

Commit 25e787b

Browse files
committed
---
yaml --- r: 96991 b: refs/heads/dist-snap c: e66bcf4 h: refs/heads/master i: 96989: 993c96f 96987: 46239e1 96983: 92512d1 96975: f39da74 96959: 0d6ff60 v: v3
1 parent 0042f8d commit 25e787b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: f38561dfd603c5a39dc1c31b0165589da6a2f5b3
9+
refs/heads/dist-snap: e66bcf44b969eb0c211dd16de89993dcdd160aa4
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/trans/debuginfo.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ use middle::pat_util;
142142
use util::ppaux;
143143

144144
use std::c_str::ToCStr;
145-
use std::cell::RefCell;
145+
use std::cell::{Cell, RefCell};
146146
use std::hashmap::HashMap;
147147
use std::hashmap::HashSet;
148148
use std::libc::{c_uint, c_ulonglong, c_longlong};
@@ -175,7 +175,7 @@ pub struct CrateDebugContext {
175175
priv crate_file: ~str,
176176
priv llcontext: ContextRef,
177177
priv builder: DIBuilderRef,
178-
priv current_debug_location: DebugLocation,
178+
priv current_debug_location: Cell<DebugLocation>,
179179
priv created_files: RefCell<HashMap<~str, DIFile>>,
180180
priv created_types: RefCell<HashMap<uint, DIType>>,
181181
priv namespace_map: RefCell<HashMap<~[ast::Ident], @NamespaceTreeNode>>,
@@ -194,7 +194,7 @@ impl CrateDebugContext {
194194
crate_file: crate,
195195
llcontext: llcontext,
196196
builder: builder,
197-
current_debug_location: UnknownLocation,
197+
current_debug_location: Cell::new(UnknownLocation),
198198
created_files: RefCell::new(HashMap::new()),
199199
created_types: RefCell::new(HashMap::new()),
200200
namespace_map: RefCell::new(HashMap::new()),
@@ -2193,7 +2193,7 @@ impl DebugLocation {
21932193
}
21942194

21952195
fn set_debug_location(cx: &mut CrateContext, debug_location: DebugLocation) {
2196-
if debug_location == debug_context(cx).current_debug_location {
2196+
if debug_location == debug_context(cx).current_debug_location.get() {
21972197
return;
21982198
}
21992199

@@ -2220,7 +2220,7 @@ fn set_debug_location(cx: &mut CrateContext, debug_location: DebugLocation) {
22202220
llvm::LLVMSetCurrentDebugLocation(cx.builder.B, metadata_node);
22212221
}
22222222

2223-
debug_context(cx).current_debug_location = debug_location;
2223+
debug_context(cx).current_debug_location.set(debug_location);
22242224
}
22252225

22262226
//=-------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)