diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2021-10-04 22:51:42 +0200 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2021-10-04 22:51:42 +0200 |
commit | 4f6dd49df3f19204694fcea55f38efd9c5118bf2 (patch) | |
tree | 119d4fa88f6f744ecdb1eb9a833c316f5932b0c1 /src/llvm/mod.rs | |
parent | a3dee93989b9fdd99b8a22a2da7f72bcd2ba50c2 (diff) | |
download | llvm-kaleidoscope-rs-4f6dd49df3f19204694fcea55f38efd9c5118bf2.tar.gz llvm-kaleidoscope-rs-4f6dd49df3f19204694fcea55f38efd9c5118bf2.zip |
ch5: added if/then/else
Diffstat (limited to 'src/llvm/mod.rs')
-rw-r--r-- | src/llvm/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/llvm/mod.rs b/src/llvm/mod.rs index 16e6bfd..c9f17b6 100644 --- a/src/llvm/mod.rs +++ b/src/llvm/mod.rs @@ -11,7 +11,6 @@ use llvm_sys::{ core::LLVMShutdown, error::{LLVMDisposeErrorMessage, LLVMErrorRef, LLVMGetErrorMessage}, - prelude::LLVMBasicBlockRef, target::{ LLVM_InitializeNativeAsmParser, LLVM_InitializeNativeAsmPrinter, LLVM_InitializeNativeTarget, @@ -19,8 +18,8 @@ use llvm_sys::{ }; use std::ffi::CStr; -use std::marker::PhantomData; +mod basic_block; mod builder; mod lljit; mod module; @@ -28,6 +27,7 @@ mod pass_manager; mod type_; mod value; +pub use basic_block::BasicBlock; pub use builder::IRBuilder; pub use lljit::{LLJit, ResourceTracker}; pub use module::Module; @@ -35,10 +35,6 @@ pub use pass_manager::FunctionPassManager; pub use type_::Type; pub use value::{FnValue, Value}; -/// Wrapper for a LLVM Basic Block. -#[derive(Copy, Clone)] -pub struct BasicBlock<'llvm>(LLVMBasicBlockRef, PhantomData<&'llvm ()>); - struct Error<'llvm>(&'llvm mut libc::c_char); impl<'llvm> Error<'llvm> { |