Clean up some prints

This commit is contained in:
Sofia 2025-07-20 05:03:53 +03:00
parent 5f65d3438a
commit c0b02f8a45
8 changed files with 4 additions and 15 deletions

View File

@ -423,7 +423,6 @@ impl Builder {
} }
Instr::GetStructElemPtr(ptr_val, idx) => { Instr::GetStructElemPtr(ptr_val, idx) => {
let ptr_ty = ptr_val.get_type(&self)?; let ptr_ty = ptr_val.get_type(&self)?;
dbg!(&ptr_ty);
if let Type::Ptr(ty) = ptr_ty { if let Type::Ptr(ty) = ptr_ty {
if let Type::CustomType(val) = *ty { if let Type::CustomType(val) = *ty {
match self.type_data(&val).kind { match self.type_data(&val).kind {

View File

@ -890,8 +890,6 @@ impl InstructionHolder {
match record.kind { match record.kind {
DebugRecordKind::Declare(instruction_value) => { DebugRecordKind::Declare(instruction_value) => {
dbg!(&self.value, &instruction_value);
LLVMDIBuilderInsertDeclareRecordBefore( LLVMDIBuilderInsertDeclareRecordBefore(
debug.builder, debug.builder,
module.values.get(&instruction_value).unwrap().value_ref, module.values.get(&instruction_value).unwrap().value_ref,

View File

@ -37,7 +37,7 @@ impl Debug for ModuleHolder {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple(&format!("{}({:#?}) ", self.data.name, self.value)) f.debug_tuple(&format!("{}({:#?}) ", self.data.name, self.value))
.field(&self.functions) .field(&self.functions)
.field(&self.debug_information) // .field(&self.debug_information)
.finish() .finish()
} }
} }
@ -266,7 +266,6 @@ impl Debug for DebugStructType {
.field("scope", &self.scope) .field("scope", &self.scope)
.field("location", &self.location) .field("location", &self.location)
.field("size_bit", &self.size_bits) .field("size_bit", &self.size_bits)
.field("alignment", &self.alignment)
.field("flags", &self.flags) .field("flags", &self.flags)
.field("elements", &self.elements) .field("elements", &self.elements)
.finish() .finish()

View File

@ -294,7 +294,6 @@ pub struct DebugStructType {
pub scope: DebugProgramValue, pub scope: DebugProgramValue,
pub location: DebugLocation, pub location: DebugLocation,
pub size_bits: u64, pub size_bits: u64,
pub alignment: u32,
pub flags: DwarfFlags, pub flags: DwarfFlags,
pub elements: Vec<DebugTypeValue>, pub elements: Vec<DebugTypeValue>,
} }

View File

@ -500,7 +500,7 @@ impl mir::Statement {
DebugMetadata::LocalVar(DebugLocalVariable { DebugMetadata::LocalVar(DebugLocalVariable {
name: name.clone(), name: name.clone(),
location, location,
ty: ty.get_debug_type(debug, scope), ty: ty.clone().get_debug_type(debug, scope),
always_preserve: true, always_preserve: true,
alignment: 32, alignment: 32,
flags: DwarfFlags, flags: DwarfFlags,
@ -568,7 +568,6 @@ impl mir::Expression {
.stack_values .stack_values
.get(&varref.1) .get(&varref.1)
.expect("Variable reference not found?!"); .expect("Variable reference not found?!");
dbg!(varref);
Some(StackValue( Some(StackValue(
v.0.map(|val| { v.0.map(|val| {
scope scope
@ -1050,7 +1049,7 @@ impl TypeKind {
.iter() .iter()
.map(|t| { .map(|t| {
( (
t.1.get_debug_type_hard( t.1.clone().get_debug_type_hard(
scope, scope,
debug_info, debug_info,
debug_types, debug_types,
@ -1066,10 +1065,9 @@ impl TypeKind {
{ {
DebugTypeData::Struct(DebugStructType { DebugTypeData::Struct(DebugStructType {
name: name.clone(), name: name.clone(),
scope: scope, scope,
location: typedef.meta.into_debug(tokens).unwrap(), location: typedef.meta.into_debug(tokens).unwrap(),
size_bits, size_bits,
alignment: 32,
flags: DwarfFlags, flags: DwarfFlags,
elements, elements,
}) })

View File

@ -181,8 +181,6 @@ impl std::fmt::Display for ReidError {
let position = if let Some(tokens) = &module.tokens { let position = if let Some(tokens) = &module.tokens {
let range_tokens = meta.range.into_tokens(&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))) get_position(&range_tokens).or(meta.position.map(|p| (p, p)))
} else if let Some(position) = meta.position { } else if let Some(position) = meta.position {
Some((position, position)) Some((position, position))

View File

@ -203,7 +203,6 @@ impl Expression {
If(expr) => expr.return_type(refs), If(expr) => expr.return_type(refs),
Indexed(expression, _, _) => { Indexed(expression, _, _) => {
let expr_type = expression.return_type(refs)?; let expr_type = expression.return_type(refs)?;
dbg!(&expr_type);
if let TypeKind::Array(elem_ty, _) = expr_type.1.resolve_weak(refs) { if let TypeKind::Array(elem_ty, _) = expr_type.1.resolve_weak(refs) {
Ok((ReturnKind::Soft, *elem_ty)) Ok((ReturnKind::Soft, *elem_ty))
} else { } else {

View File

@ -141,7 +141,6 @@ impl Block {
.ok() .ok()
.unwrap_or((ReturnKind::Soft, Void)); .unwrap_or((ReturnKind::Soft, Void));
let mut ret_type_ref = outer_refs.from_type(&ty).unwrap(); 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 // Narow return type to declared type if hard return
if kind == ReturnKind::Hard { if kind == ReturnKind::Hard {