Fixed compile warnings.
Fixed whitespace "errors".
This commit is contained in:
parent
00bb15bf72
commit
62e86e044d
3 changed files with 96 additions and 95 deletions
|
@ -25,12 +25,10 @@ use core::hashmap::HashMap;
|
|||
use core::libc;
|
||||
use core::libc::c_uint;
|
||||
use core::ptr;
|
||||
use core::str;
|
||||
use core::str::as_c_str;
|
||||
use core::sys;
|
||||
use core::vec;
|
||||
use syntax::codemap::span;
|
||||
use syntax::parse::token::ident_interner;
|
||||
use syntax::{ast, codemap, ast_util, ast_map};
|
||||
|
||||
static LLVMDebugVersion: int = (12 << 16);
|
||||
|
@ -166,7 +164,7 @@ fn span_start(cx: @CrateContext, span: span) -> codemap::Loc {
|
|||
fn create_block(bcx: block) -> DILexicalBlock {
|
||||
let mut bcx = bcx;
|
||||
let cx = bcx.ccx();
|
||||
let mut dcx = dbg_cx(cx);
|
||||
let dcx = dbg_cx(cx);
|
||||
|
||||
while bcx.node_info.is_none() {
|
||||
match bcx.parent {
|
||||
|
@ -211,7 +209,7 @@ fn size_and_align_of(cx: @CrateContext, t: ty::t) -> (uint, uint) {
|
|||
}
|
||||
|
||||
fn create_basic_type(cx: @CrateContext, t: ty::t, span: span) -> DIType{
|
||||
let mut dcx = dbg_cx(cx);
|
||||
let dcx = dbg_cx(cx);
|
||||
let ty_id = ty::type_id(t);
|
||||
match dcx.created_types.find(&ty_id) {
|
||||
Some(ty_md) => return *ty_md,
|
||||
|
@ -475,7 +473,7 @@ fn create_fn_ty(cx: @CrateContext, fn_ty: ty::t, inputs: ~[ty::t], output: ty::t
|
|||
}
|
||||
|
||||
fn create_ty(cx: @CrateContext, t: ty::t, span: span) -> DIType {
|
||||
let mut dcx = dbg_cx(cx);
|
||||
let dcx = dbg_cx(cx);
|
||||
let ty_id = ty::type_id(t);
|
||||
match dcx.created_types.find(&ty_id) {
|
||||
Some(ty_md) => return *ty_md,
|
||||
|
@ -606,17 +604,20 @@ pub fn create_local_var(bcx: block, local: @ast::local) -> DIVariable {
|
|||
|
||||
pub fn create_arg(bcx: block, arg: ast::arg, span: span) -> Option<DIVariable> {
|
||||
debug!("create_arg");
|
||||
let fcx = bcx.fcx, cx = *fcx.ccx;
|
||||
if true {
|
||||
// FIXME(5848) create_arg disabled for now because "node_id_type(bcx, arg.id)" below blows
|
||||
// up: "error: internal compiler error: node_id_to_type: no type for node `arg (id=10)`"
|
||||
return None;
|
||||
}
|
||||
|
||||
let fcx = bcx.fcx;
|
||||
let cx = *fcx.ccx;
|
||||
let dcx = dbg_cx(cx);
|
||||
|
||||
let loc = span_start(cx, span);
|
||||
if "<intrinsic>" == loc.file.name {
|
||||
return None;
|
||||
}
|
||||
// FIXME: Disabled for now because "node_id_type(bcx, arg.id)" below blows up:
|
||||
// "error: internal compiler error: node_id_to_type: no type for node `arg (id=10)`"
|
||||
// (same as https://github.com/mozilla/rust/issues/5848)
|
||||
return None;
|
||||
|
||||
let ty = node_id_type(bcx, arg.id);
|
||||
let tymd = create_ty(cx, ty, arg.ty.span);
|
||||
|
@ -665,7 +666,7 @@ pub fn update_source_pos(bcx: block, span: span) {
|
|||
|
||||
let cx = bcx.ccx();
|
||||
let loc = span_start(cx, span);
|
||||
let mut dcx = dbg_cx(cx);
|
||||
let dcx = dbg_cx(cx);
|
||||
|
||||
let loc = (loc.line, loc.col.to_uint());
|
||||
if loc == dcx.curr_loc {
|
||||
|
@ -678,7 +679,7 @@ pub fn update_source_pos(bcx: block, span: span) {
|
|||
|
||||
pub fn create_function(fcx: fn_ctxt) -> DISubprogram {
|
||||
let cx = *fcx.ccx;
|
||||
let mut dcx = dbg_cx(cx);
|
||||
let dcx = dbg_cx(cx);
|
||||
let fcx = &mut *fcx;
|
||||
let span = fcx.span.get();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue