Skip to content

Commit a2c3559

Browse files
committed
Add a comment explaining why the safety check is there.
1 parent 7c5b7b6 commit a2c3559

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/values/instruction_value.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ impl<'ctx> InstructionValue<'ctx> {
183183
}
184184

185185
pub fn is_tail_call(&self) -> bool {
186+
// LLVMIsTailCall has UB if the value is not an llvm::CallInst*.
186187
if self.get_opcode() == InstructionOpcode::Call {
187188
unsafe {
188189
LLVMIsTailCall(self.as_value_ref()) == 1

0 commit comments

Comments
 (0)