We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2e2808 commit 7c5b7b6Copy full SHA for 7c5b7b6
src/values/instruction_value.rs
@@ -182,11 +182,13 @@ impl<'ctx> InstructionValue<'ctx> {
182
BasicBlock::new(value)
183
}
184
185
- // REVIEW: See if necessary to check opcode == Call first.
186
- // Does it always return false otherwise?
187
pub fn is_tail_call(&self) -> bool {
188
- unsafe {
189
- LLVMIsTailCall(self.as_value_ref()) == 1
+ if self.get_opcode() == InstructionOpcode::Call {
+ unsafe {
+ LLVMIsTailCall(self.as_value_ref()) == 1
+ }
190
+ } else {
191
+ false
192
193
194
0 commit comments