[llvm-commits] [PATCH] More closely match docs for CallSite::getCalledFunction
Nick Sumner
wsumner at cs.purdue.edu
Thu Jul 19 11:33:35 PDT 2012
The documentation for CallSite::getCalledFunction is inconsistent with
what the function does. Without optimization, a direct call may be
made through a cast. This causes the function to return null even
though the call was direct. This is problematic for those of us using
LLVM in a context where we can't necessarily apply optimizations
before running our analyses.
Attached is a patch that simply calls stripPointerCasts on the called
value before converting it into a Function. I realize that handling
the general case may not be a priority, so alternatively, I could
submit a patch that makes the documentation more explicit about this
limitation.
thanks,
Nick Sumner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CallSite.patch
Type: application/octet-stream
Size: 528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120719/0d57c608/attachment.obj>
More information about the llvm-commits
mailing list