[PATCH] D52894: Update CallSite docs and add a new function (NFC)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 17 15:45:48 PDT 2018
efriedma added inline comments.
================
Comment at: include/llvm/IR/CallSite.h:108
+ ///
+ /// See isIndirectCall() for the definition of an indirect call.
FunTy *getCalledFunction() const {
----------------
Maybe it would be better to avoid "direct" and "indirect"...? Maybe just say "Return the function being called if the callee Value is a Function".
================
Comment at: include/llvm/IR/CallSite.h:117
+ /// See isIndirectCall() for the definition of an indirect call.
+ FunTy *getCalledFunctionStripCasts() const {
+ return dyn_cast<FunTy>(getCalledValue()->stripPointerCasts());
----------------
The new function seems nice.
================
Comment at: include/llvm/IR/CallSite.h:126
+ /// same function. For example, a call to a bitcast of a function is
+ /// considered indirect.
bool isIndirectCall() const {
----------------
This isn't what isIndirectCall actually implements...
https://reviews.llvm.org/D52894
More information about the llvm-commits
mailing list