Skip to content

Commit a8eaac9

Browse files
committed
Remove a misleading comment.
build_free() builds `call _free`, which should accompany malloc and not alloca.
1 parent 80c49e0 commit a8eaac9

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/builder.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ impl Builder {
6363
unsafe { core::LLVMBuildArrayAlloca(self.into(), elem.into(), size.into(), NULL_NAME.as_ptr() as *const c_char) }.into()
6464
}
6565
/// Build an instruction that allocates a pointer to fit the size of `ty` then returns this pointer.
66-
///
67-
/// Make sure to call `build_free` with the pointer value when you're done with it, or you're
68-
/// gonna have a bad time.
6966
pub fn build_alloca(&self, ty: &Type) -> &Value {
7067
unsafe { core::LLVMBuildAlloca(self.into(), ty.into(), NULL_NAME.as_ptr() as *const c_char) }.into()
7168
}

0 commit comments

Comments
 (0)