Skip to content

Commit 064d757

Browse files
committed
Handle inferred basic types when generating debug information for types.
1 parent 6c26b89 commit 064d757

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/comp/middle/debuginfo.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,20 @@ fn get_ty_metadata(cx: @crate_ctxt, t: ty::t, ty: @ast::ty) -> @metadata<tydesc_
230230
fn size_and_align_of<T>() -> (int, int) {
231231
(sys::size_of::<T>() as int, sys::align_of::<T>() as int)
232232
}
233-
let (name, (size, align), encoding) = alt ty.node {
233+
let ast_ty = alt ty.node {
234+
ast::ty_infer. {
235+
alt ty::struct(ccx_tcx(cx), t) {
236+
ty::ty_bool. { ast::ty_bool }
237+
ty::ty_int. { ast::ty_int }
238+
ty::ty_uint. { ast::ty_uint }
239+
ty::ty_float. { ast::ty_float }
240+
ty::ty_machine(m) { ast::ty_machine(m) }
241+
ty::ty_char. { ast::ty_char }
242+
}
243+
}
244+
_ { ty.node }
245+
};
246+
let (name, (size, align), encoding) = alt ast_ty {
234247
ast::ty_bool. {("bool", size_and_align_of::<bool>(), DW_ATE_boolean)}
235248
ast::ty_int. {("int", size_and_align_of::<int>(), DW_ATE_signed)}
236249
ast::ty_uint. {("uint", size_and_align_of::<uint>(), DW_ATE_unsigned)}

0 commit comments

Comments
 (0)