Skip to content

Commit c4f28da

Browse files
committed
---
yaml --- r: 235591 b: refs/heads/stable c: 47128b8 h: refs/heads/master i: 235589: bf2d8c8 235587: 5245636 235583: 2693e47 v: v3
1 parent 0b371e1 commit c4f28da

File tree

2 files changed

+14
-7
lines changed
  • branches/stable/src/librustc_trans/trans/debuginfo

2 files changed

+14
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 1373c4fcf21930a22150210200bdc14f5f935b3c
32+
refs/heads/stable: 47128b8c7ed38b28e1e7788bc9d5197959d450e8
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc_trans/trans/debuginfo/mod.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use middle::subst::{self, Substs};
3030
use rustc::ast_map;
3131
use trans::common::{NodeIdAndSpan, CrateContext, FunctionContext, Block};
3232
use trans;
33-
use trans::monomorphize;
33+
use trans::{monomorphize, type_of};
3434
use middle::ty::{self, Ty};
3535
use session::config::{self, FullDebugInfo, LimitedDebugInfo, NoDebugInfo};
3636
use util::nodemap::{NodeMap, FnvHashMap, FnvHashSet};
@@ -41,7 +41,7 @@ use std::ffi::CString;
4141
use std::ptr;
4242
use std::rc::Rc;
4343
use syntax::codemap::{Span, Pos};
44-
use syntax::{ast, codemap, ast_util};
44+
use syntax::{abi, ast, codemap, ast_util};
4545
use syntax::attr::IntType;
4646
use syntax::parse::token::{self, special_idents};
4747

@@ -412,12 +412,13 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
412412
assert_type_for_node_id(cx, fn_ast_id, error_reporting_span);
413413
let fn_type = cx.tcx().node_id_to_type(fn_ast_id);
414414

415-
let sig = match fn_type.sty {
415+
let (sig, abi) = match fn_type.sty {
416416
ty::TyBareFn(_, ref barefnty) => {
417-
cx.tcx().erase_late_bound_regions(&barefnty.sig)
417+
(cx.tcx().erase_late_bound_regions(&barefnty.sig), barefnty.abi)
418418
}
419419
ty::TyClosure(def_id, substs) => {
420-
cx.tcx().erase_late_bound_regions(&cx.tcx().closure_type(def_id, substs).sig)
420+
let closure_type = cx.tcx().closure_type(def_id, substs);
421+
(cx.tcx().erase_late_bound_regions(&closure_type.sig), closure_type.abi)
421422
}
422423

423424
_ => cx.sess().bug("get_function_metdata: Expected a function type!")
@@ -435,8 +436,14 @@ pub fn create_function_debug_context<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
435436
ty::FnDiverging => diverging_type_metadata(cx)
436437
});
437438

439+
let inputs = &if abi == abi::RustCall {
440+
type_of::untuple_arguments(cx, &sig.inputs)
441+
} else {
442+
sig.inputs
443+
};
444+
438445
// Arguments types
439-
for &argument_type in &sig.inputs {
446+
for &argument_type in inputs {
440447
signature.push(type_metadata(cx, argument_type, codemap::DUMMY_SP));
441448
}
442449

0 commit comments

Comments
 (0)