Skip to content

Commit

Permalink
Testing with llvm13
Browse files Browse the repository at this point in the history
  • Loading branch information
Cypher1 committed Apr 15, 2024
1 parent b7a7a9f commit 772d5f6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
37 changes: 33 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion takolib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ num-traits = "0.2"
enum-kinds = "0.5"
lazy_static = "1.4.0"
env_logger = { version = "0.9", optional = true }
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm15-0"], optional = true }
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm13-0"], optional = true }
wasm-logger = { version = "0.2.0", optional = true }
melior = { version = "0.3.1", optional = true }
smallvec = { version = "1.10.0", features = [ "const_new", "const_generics", "union" ] }
Expand Down
5 changes: 2 additions & 3 deletions takolib/src/codegen/backend/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ impl<'ctx> BackendStateTrait for LlvmState<'ctx> {
}

fn array_of_strings_type(&mut self) -> Self::PointerType {
let char_star_type = self.char_ptr_type();
Context::ptr_type
self.char_ptr_type()
}
fn const_int<T: Into<u64>>(&mut self, ty: Self::IntType, value: T) -> Self::Value {
// TODO: Check bounds.
Expand Down Expand Up @@ -200,7 +199,7 @@ impl<'ctx> BackendStateTrait for LlvmState<'ctx> {
}

fn char_ptr_type(&mut self) -> Self::PointerType {
Context::ptr_type
self.context.ptr_type(AddressSpace::default())
}

fn global_string(&mut self, value: &str) -> Self::PointerValue {
Expand Down

0 comments on commit 772d5f6

Please sign in to comment.