Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat-Lafon committed Oct 24, 2024
1 parent ad2b6e9 commit f3ccd1d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bril-rs/brillvm/src/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,16 @@ impl<'a, 'b> Heap<'a, 'b> {
name: &'b String,
ty: &Type,
) -> WrappedPointer<'a> {
let result = self.map
let result = self
.map
.entry(name)
.or_insert_with(|| WrappedPointer::new(builder, context, name, ty))
.clone();
if result.ty != *ty {
println!("`{}` had type `{}` but is now being assigned type `{}`", name, result.ty, ty);
println!(
"`{}` had type `{}` but is now being assigned type `{}`",
name, result.ty, ty
);
unimplemented!("brillvm does not currently support variables within a function having different types. Implementing this might require a control flow analysis? Feel free to try and implement this.")
}
result
Expand Down

0 comments on commit f3ccd1d

Please sign in to comment.