diff --git a/reid-llvm-lib/src/builder.rs b/reid-llvm-lib/src/builder.rs index 1024947..9322144 100644 --- a/reid-llvm-lib/src/builder.rs +++ b/reid-llvm-lib/src/builder.rs @@ -423,7 +423,6 @@ impl Builder { } Instr::GetStructElemPtr(ptr_val, idx) => { let ptr_ty = ptr_val.get_type(&self)?; - dbg!(&ptr_ty); if let Type::Ptr(ty) = ptr_ty { if let Type::CustomType(val) = *ty { match self.type_data(&val).kind { diff --git a/reid-llvm-lib/src/compile.rs b/reid-llvm-lib/src/compile.rs index 7aabc78..f2d9327 100644 --- a/reid-llvm-lib/src/compile.rs +++ b/reid-llvm-lib/src/compile.rs @@ -890,8 +890,6 @@ impl InstructionHolder { match record.kind { DebugRecordKind::Declare(instruction_value) => { - dbg!(&self.value, &instruction_value); - LLVMDIBuilderInsertDeclareRecordBefore( debug.builder, module.values.get(&instruction_value).unwrap().value_ref, diff --git a/reid-llvm-lib/src/debug.rs b/reid-llvm-lib/src/debug.rs index 86fd9bd..d2d28d7 100644 --- a/reid-llvm-lib/src/debug.rs +++ b/reid-llvm-lib/src/debug.rs @@ -37,7 +37,7 @@ impl Debug for ModuleHolder { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_tuple(&format!("{}({:#?}) ", self.data.name, self.value)) .field(&self.functions) - .field(&self.debug_information) + // .field(&self.debug_information) .finish() } } @@ -266,7 +266,6 @@ impl Debug for DebugStructType { .field("scope", &self.scope) .field("location", &self.location) .field("size_bit", &self.size_bits) - .field("alignment", &self.alignment) .field("flags", &self.flags) .field("elements", &self.elements) .finish() diff --git a/reid-llvm-lib/src/debug_information.rs b/reid-llvm-lib/src/debug_information.rs index f286da2..137e429 100644 --- a/reid-llvm-lib/src/debug_information.rs +++ b/reid-llvm-lib/src/debug_information.rs @@ -294,7 +294,6 @@ pub struct DebugStructType { pub scope: DebugProgramValue, pub location: DebugLocation, pub size_bits: u64, - pub alignment: u32, pub flags: DwarfFlags, pub elements: Vec, } diff --git a/reid/src/codegen.rs b/reid/src/codegen.rs index 0eecdbd..211d4c4 100644 --- a/reid/src/codegen.rs +++ b/reid/src/codegen.rs @@ -500,7 +500,7 @@ impl mir::Statement { DebugMetadata::LocalVar(DebugLocalVariable { name: name.clone(), location, - ty: ty.get_debug_type(debug, scope), + ty: ty.clone().get_debug_type(debug, scope), always_preserve: true, alignment: 32, flags: DwarfFlags, @@ -568,7 +568,6 @@ impl mir::Expression { .stack_values .get(&varref.1) .expect("Variable reference not found?!"); - dbg!(varref); Some(StackValue( v.0.map(|val| { scope @@ -1050,7 +1049,7 @@ impl TypeKind { .iter() .map(|t| { ( - t.1.get_debug_type_hard( + t.1.clone().get_debug_type_hard( scope, debug_info, debug_types, @@ -1066,10 +1065,9 @@ impl TypeKind { { DebugTypeData::Struct(DebugStructType { name: name.clone(), - scope: scope, + scope, location: typedef.meta.into_debug(tokens).unwrap(), size_bits, - alignment: 32, flags: DwarfFlags, elements, }) diff --git a/reid/src/error_raporting.rs b/reid/src/error_raporting.rs index 76910ef..bd54df5 100644 --- a/reid/src/error_raporting.rs +++ b/reid/src/error_raporting.rs @@ -181,8 +181,6 @@ impl std::fmt::Display for ReidError { let position = if let Some(tokens) = &module.tokens { let range_tokens = meta.range.into_tokens(&tokens); - dbg!(&error); - dbg!(&meta.range, &tokens[meta.range.start]); get_position(&range_tokens).or(meta.position.map(|p| (p, p))) } else if let Some(position) = meta.position { Some((position, position)) diff --git a/reid/src/mir/impl.rs b/reid/src/mir/impl.rs index 6a4ef82..02443cb 100644 --- a/reid/src/mir/impl.rs +++ b/reid/src/mir/impl.rs @@ -203,7 +203,6 @@ impl Expression { If(expr) => expr.return_type(refs), Indexed(expression, _, _) => { let expr_type = expression.return_type(refs)?; - dbg!(&expr_type); if let TypeKind::Array(elem_ty, _) = expr_type.1.resolve_weak(refs) { Ok((ReturnKind::Soft, *elem_ty)) } else { diff --git a/reid/src/mir/typeinference.rs b/reid/src/mir/typeinference.rs index 5407dde..1a86f2f 100644 --- a/reid/src/mir/typeinference.rs +++ b/reid/src/mir/typeinference.rs @@ -141,7 +141,6 @@ impl Block { .ok() .unwrap_or((ReturnKind::Soft, Void)); let mut ret_type_ref = outer_refs.from_type(&ty).unwrap(); - dbg!(&self.return_type(inner_refs.types)); // Narow return type to declared type if hard return if kind == ReturnKind::Hard {