Skip to content

Commit f3d95da

Browse files
committed
added zext
1 parent 7b5ebde commit f3d95da

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
@@ -114,6 +114,9 @@ impl Builder {
114114
pub fn build_int_to_ptr(&self, value: &Value, dest: &Type) -> &Value {
115115
unsafe { core::LLVMBuildIntToPtr(self.into(), value.into(), dest.into(), NULL_NAME.as_ptr()).into() }
116116
}
117+
pub fn build_zext(&self, value: &Value, dest: &Type) -> &Value {
118+
unsafe { core::LLVMBuildZExtOrBitCast(self.into(), value.into(), dest.into(), NULL_NAME.as_ptr()).into() }
119+
}
117120
/// Build an instruction that truncates the high-order bits of value to fit into a certain type.
118121
pub fn build_trunc(&self, value: &Value, dest: &Type) -> &Value {
119122
unsafe { core::LLVMBuildTrunc(self.into(), value.into(), dest.into(), NULL_NAME.as_ptr()).into() }

0 commit comments

Comments
 (0)