[PATCH] D14356: Sancov in C++.
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 14:54:32 PST 2015
kcc added inline comments.
================
Comment at: lib/sanitizer_common/sancov.cc:157
@@ +156,3 @@
+ merge(const std::vector<std::unique_ptr<CoverageData>> &Covs) {
+ std::unsorted_set<unit64_t> Addrs;
+ size_t Sz = 0;
----------------
did you mean unordered_set?
================
Comment at: lib/sanitizer_common/sancov.cc:162
@@ +161,3 @@
+
+ Addrs.reserve(Sz);
+ for (const auto &Cov : Covs) {
----------------
I wouldn't bother with reserve, but I would actually use set, not an unordered_set so that the resulting PCs are sorted (just in case).
================
Comment at: lib/sanitizer_common/sancov.cc:163
@@ +162,3 @@
+ Addrs.reserve(Sz);
+ for (const auto &Cov : Covs) {
+ Addrs.insert(Addrs->end(), Cov->Addrs->begin(), Cov->Addrs->end());
----------------
no {}
http://reviews.llvm.org/D14356
More information about the llvm-commits
mailing list