Skip to content

Commit c169ad6

Browse files
---
yaml --- r: 92335 b: refs/heads/auto c: 45e472a h: refs/heads/master i: 92333: ac5d836 92331: b4fdadc 92327: e3e3ad9 92319: 9aa8064 v: v3
1 parent 9659b6c commit c169ad6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 7eae649a015cd2e4c5764b2955edb7542410f1f1
16+
refs/heads/auto: 45e472aa4bdcec7a5bfd8cdaa10dd00435242162
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc/middle/trans/_match.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ use util::common::indenter;
220220
use util::ppaux::{Repr, vec_map_to_str};
221221

222222
use std::hashmap::HashMap;
223+
use std::ptr;
223224
use std::vec;
224225
use syntax::ast;
225226
use syntax::ast::Ident;
@@ -2046,7 +2047,10 @@ pub fn store_arg(mut bcx: @mut Block,
20462047
// Debug information (the llvm.dbg.declare intrinsic to be precise) always expects to get an
20472048
// alloca, which only is the case on the general path, so lets disable the optimized path when
20482049
// debug info is enabled.
2049-
let fast_path = !bcx.ccx().sess.opts.extra_debuginfo && simple_identifier(pat).is_some();
2050+
let arg_is_alloca = unsafe { llvm::LLVMIsAAllocaInst(llval) != ptr::null() };
2051+
2052+
let fast_path = (arg_is_alloca || !bcx.ccx().sess.opts.extra_debuginfo)
2053+
&& simple_identifier(pat).is_some();
20502054

20512055
if fast_path {
20522056
// Optimized path for `x: T` case. This just adopts

0 commit comments

Comments
 (0)