Skip to content

Commit ec1d810

Browse files
committed
---
yaml --- r: 180123 b: refs/heads/auto c: e22480beed35df39a755f8ab8974d08b3dd69ea6 h: refs/heads/master i: 180121: c956c9b 180119: fd60a1d v: v3
1 parent 2142edf commit ec1d810

File tree

20 files changed

+836
-737
lines changed

20 files changed

+836
-737
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 35ff6c59676269dd6c0fa9f8048e47ccb1cfde0f
13+
refs/heads/auto: e22480beed35df39a755f8ab8974d08b3dd69ea6
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc_llvm/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ extern {
881881

882882

883883
/* Operations on global variables */
884+
pub fn LLVMIsAGlobalVariable(GlobalVar: ValueRef) -> ValueRef;
884885
pub fn LLVMAddGlobal(M: ModuleRef, Ty: TypeRef, Name: *const c_char)
885886
-> ValueRef;
886887
pub fn LLVMAddGlobalInAddressSpace(M: ModuleRef,

branches/auto/src/librustc_trans/trans/_match.rs

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,14 @@ impl<'a, 'tcx> Opt<'a, 'tcx> {
278278
match *self {
279279
ConstantValue(ConstantExpr(lit_expr), _) => {
280280
let lit_ty = ty::node_id_to_type(bcx.tcx(), lit_expr.id);
281-
let (llval, _) = consts::const_expr(ccx, &*lit_expr);
281+
let (llval, _) = consts::const_expr(ccx, &*lit_expr, bcx.fcx.param_substs);
282282
let lit_datum = immediate_rvalue(llval, lit_ty);
283283
let lit_datum = unpack_datum!(bcx, lit_datum.to_appropriate_datum(bcx));
284284
SingleResult(Result::new(bcx, lit_datum.val))
285285
}
286286
ConstantRange(ConstantExpr(ref l1), ConstantExpr(ref l2), _) => {
287-
let (l1, _) = consts::const_expr(ccx, &**l1);
288-
let (l2, _) = consts::const_expr(ccx, &**l2);
287+
let (l1, _) = consts::const_expr(ccx, &**l1, bcx.fcx.param_substs);
288+
let (l2, _) = consts::const_expr(ccx, &**l2, bcx.fcx.param_substs);
289289
RangeResult(Result::new(bcx, l1), Result::new(bcx, l2))
290290
}
291291
Variant(disr_val, ref repr, _, _) => {
@@ -832,8 +832,8 @@ fn compare_values<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
832832

833833
let _icx = push_ctxt("compare_values");
834834
if ty::type_is_scalar(rhs_t) {
835-
let rs = compare_scalar_types(cx, lhs, rhs, rhs_t, ast::BiEq, debug_loc);
836-
return Result::new(rs.bcx, rs.val);
835+
let cmp = compare_scalar_types(cx, lhs, rhs, rhs_t, ast::BiEq, debug_loc);
836+
return Result::new(cx, cmp);
837837
}
838838

839839
match rhs_t.sty {
@@ -1163,29 +1163,16 @@ fn compile_submatch_continue<'a, 'p, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
11631163
}
11641164
RangeResult(Result { val: vbegin, .. },
11651165
Result { bcx, val: vend }) => {
1166-
let Result { bcx, val: llge } =
1167-
compare_scalar_types(bcx,
1168-
test_val,
1169-
vbegin,
1170-
t,
1171-
ast::BiGe,
1172-
debug_loc);
1173-
let Result { bcx, val: llle } =
1174-
compare_scalar_types(bcx,
1175-
test_val,
1176-
vend,
1177-
t,
1178-
ast::BiLe,
1179-
debug_loc);
1180-
Result::new(bcx, And(bcx, llge, llle, debug_loc))
1166+
let llge = compare_scalar_types(bcx, test_val, vbegin,
1167+
t, ast::BiGe, debug_loc);
1168+
let llle = compare_scalar_types(bcx, test_val, vend,
1169+
t, ast::BiLe, debug_loc);
1170+
Result::new(bcx, And(bcx, llge, llle, DebugLoc::None))
11811171
}
11821172
LowerBound(Result { bcx, val }) => {
1183-
compare_scalar_types(bcx,
1184-
test_val,
1185-
val,
1186-
t,
1187-
ast::BiGe,
1188-
debug_loc)
1173+
Result::new(bcx, compare_scalar_types(bcx, test_val,
1174+
val, t, ast::BiGe,
1175+
debug_loc))
11891176
}
11901177
}
11911178
};

0 commit comments

Comments
 (0)