Operand name missing


I was trying to use the following code in a if condition

where I is an instruction with following condition already true -
I->getOpcode() == Instruction::Call

When I compiled a C code with llvm-2.9, I see a function call with no
operand name (for operand 0) . This happens for a function with
varArgs. The interesting part is that the same C code when compiled
with llvm-2.6 contains the I->getOperand(0)->Name as name of the

I will try to dig in to get the reason. Can some one give me pointer
to what can be reason for this?

Thanks and regards,

The order of the operands of a CallInst changed; try using something
like "cast<CallInst>(I)->getCalledFunction()" instead.


Thanks Eli,

It was stupid to miss that even with gdb :).

Thanks again.