[PATCH] D29320: [XRay] A tool for Comparing xray function call graphs
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 28 13:43:41 PDT 2017
sanjoy added inline comments.
================
Comment at: tools/llvm-xray/xray-graph-diff.cc:310-315
+template <typename T> static bool containsNullptr(const T &Collection) {
+ for (const auto &E : Collection)
+ if (E == nullptr)
+ return true;
+ return false;
+}
----------------
dberris wrote:
> Why isn't the caller of this just doing:
>
> ```
> llvm::find(Collection, nullptr) != Collection.end()
> ```
Armchair comment: we also have `llvm::is_contained` in STLExtras.h
Repository:
rL LLVM
https://reviews.llvm.org/D29320
More information about the llvm-commits
mailing list