Skip to content

Commit 7b5ebde

Browse files
committed
added int_to_ptr to builder
1 parent c6e1fb4 commit 7b5ebde

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/builder.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ impl Builder {
111111
pub fn build_bit_cast(&self, value: &Value, dest: &Type) -> &Value {
112112
unsafe { core::LLVMBuildBitCast(self.into(), value.into(), dest.into(), NULL_NAME.as_ptr()).into() }
113113
}
114+
pub fn build_int_to_ptr(&self, value: &Value, dest: &Type) -> &Value {
115+
unsafe { core::LLVMBuildIntToPtr(self.into(), value.into(), dest.into(), NULL_NAME.as_ptr()).into() }
116+
}
114117
/// Build an instruction that truncates the high-order bits of value to fit into a certain type.
115118
pub fn build_trunc(&self, value: &Value, dest: &Type) -> &Value {
116119
unsafe { core::LLVMBuildTrunc(self.into(), value.into(), dest.into(), NULL_NAME.as_ptr()).into() }

0 commit comments

Comments
 (0)