Skip to content

Commit

Permalink
debuginfo: Fix style nits for pull request.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Sep 15, 2013
1 parent ccb721a commit c3ffbc3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/librustc/lib/llvm.rs
Expand Up @@ -2120,7 +2120,6 @@ pub mod llvm {
#[fast_ffi]
pub fn LLVMDICompositeTypeSetTypeArray(CompositeType: ValueRef, TypeArray: ValueRef);


#[fast_ffi]
pub fn LLVMIsAArgument(value_ref: ValueRef) -> ValueRef;

Expand Down
21 changes: 10 additions & 11 deletions src/librustc/middle/trans/debuginfo.rs
Expand Up @@ -601,10 +601,8 @@ pub fn create_function_debug_context(cx: &mut CrateContext,
_) => {
(ident, fn_decl, generics, Some(top_level_block), span)
}
ast_map::node_foreign_item(@ast::foreign_item { _ }, _, _, _) => {
return FunctionWithoutDebugInfo;
}
ast_map::node_variant(*) |
ast_map::node_foreign_item(@ast::foreign_item { _ }, _, _, _) |
ast_map::node_variant(*) |
ast_map::node_struct_ctor(*) => {
return FunctionWithoutDebugInfo;
}
Expand Down Expand Up @@ -1166,9 +1164,10 @@ impl RecursiveTypeDescription {
// Insert the stub into the cache in order to allow recursive references ...
debug_context(cx).created_types.insert(cache_id, metadata_stub);

// ... then create the member descriptions
// ... then create the member descriptions ...
let member_descriptions = member_description_factory(cx);

// ... and attach them to the stub to complete it.
set_members_of_composite_type(cx,
metadata_stub,
llvm_type,
Expand Down Expand Up @@ -1465,7 +1464,7 @@ fn prepare_enum_metadata(cx: &mut CrateContext,
}

enum MemberOffset {
FixedMemberOffset{ bytes: uint },
FixedMemberOffset { bytes: uint },
// For ComputedMemberOffset, the offset is read from the llvm type definition
ComputedMemberOffset
}
Expand Down Expand Up @@ -1863,14 +1862,14 @@ fn trait_metadata(cx: &mut CrateContext,
// the trait's methods.
let path = ty::item_path(cx.tcx, def_id);
let ident = path.last().ident();
let name = ppaux::trait_store_to_str(cx.tcx, trait_store)
+ ppaux::mutability_to_str(mutability)
+ token::ident_to_str(&ident);
let name = ppaux::trait_store_to_str(cx.tcx, trait_store) +
ppaux::mutability_to_str(mutability) +
token::ident_to_str(&ident);
// Add type and region parameters
let name = ppaux::parameterized(cx.tcx, name, &substs.regions, substs.tps);

let (containing_scope,
definition_span) = get_namespace_and_span_for_item(cx, def_id, usage_site_span);
let (containing_scope, definition_span) =
get_namespace_and_span_for_item(cx, def_id, usage_site_span);

let file_name = span_start(cx, definition_span).file.name;
let file_metadata = file_metadata(cx, file_name);
Expand Down
2 changes: 0 additions & 2 deletions src/test/debug-info/trait-pointers.rs
Expand Up @@ -31,5 +31,3 @@ fn main() {
let managed: @Trait = @Struct { a:2, b: 3.0 } as @Trait;
let unique: ~Trait = ~Struct { a:2, b: 3.0 } as ~Trait;
}

fn zzz() {()}

0 comments on commit c3ffbc3

Please sign in to comment.