[PATCH] D82572: [CallGraph] Add support for callback call sites
Sergey Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 18:02:26 PDT 2020
sdmitriev added inline comments.
================
Comment at: llvm/include/llvm/Analysis/CallGraph.h:178
/// and the call graph node being called.
- using CallRecord = std::pair<WeakTrackingVH, CallGraphNode *>;
+ using CallRecord = std::pair<Optional<WeakTrackingVH>, CallGraphNode *>;
----------------
jdoerfert wrote:
> This change is unrelated, right? Or did I miss where you differentiate between `None` and `nullptr`? If so, we should probably describe here what each means.
No, it is related. For ‘reference’ edges that are not associated with any call instruction CallRecord is created with the first field set to `None`, while real calls have instruction address there (please see lines 246-247 below). Therefore all real calls are expected to have a value in this field and it is not supposed to be `nullptr`. I will add a comment explaining this.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82572/new/
https://reviews.llvm.org/D82572
More information about the llvm-commits
mailing list