[LLVMdev] problem with visitBranchInst()
Jun Koi
junkoi2004 at gmail.com
Mon Jul 9 01:44:30 PDT 2012
hi,
my code inherits InstVisitor class, and visitBranchInst() method.
however, i notice that inside the virtual method
visitBranchInst(BranchInst &I), on the LLVM instruction like:
br i1 %1, label %2, label %3
my code doesnt return expected info. for ex, the code
I.getCondition->getName().str()
would return empty string. and at the same time, the code
I.getSuccessor(0)->getName()
would also return emtpy string.
i am pretty confused, as i am expecting non-empty strings returned
from the above functions.
any idea on why this happens?
this is on LLVM 3.0, Ubuntu 12.04.
thanks so much,
Jun
More information about the llvm-dev
mailing list