From 064d757ece8d4d846e68da0a8f826cc1f309a730 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Tue, 6 Dec 2011 12:49:53 -0500 Subject: [PATCH] Handle inferred basic types when generating debug information for types. --- src/comp/middle/debuginfo.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/comp/middle/debuginfo.rs b/src/comp/middle/debuginfo.rs index be70c1b3f3d..e372fc86e8b 100644 --- a/src/comp/middle/debuginfo.rs +++ b/src/comp/middle/debuginfo.rs @@ -230,7 +230,20 @@ fn get_ty_metadata(cx: @crate_ctxt, t: ty::t, ty: @ast::ty) -> @metadata() -> (int, int) { (sys::size_of::() as int, sys::align_of::() as int) } - let (name, (size, align), encoding) = alt ty.node { + let ast_ty = alt ty.node { + ast::ty_infer. { + alt ty::struct(ccx_tcx(cx), t) { + ty::ty_bool. { ast::ty_bool } + ty::ty_int. { ast::ty_int } + ty::ty_uint. { ast::ty_uint } + ty::ty_float. { ast::ty_float } + ty::ty_machine(m) { ast::ty_machine(m) } + ty::ty_char. { ast::ty_char } + } + } + _ { ty.node } + }; + let (name, (size, align), encoding) = alt ast_ty { ast::ty_bool. {("bool", size_and_align_of::(), DW_ATE_boolean)} ast::ty_int. {("int", size_and_align_of::(), DW_ATE_signed)} ast::ty_uint. {("uint", size_and_align_of::(), DW_ATE_unsigned)}