majnemer added inline comments.

================
Comment at: lib/CodeGen/CGDebugInfo.cpp:1392
+    auto *BaseTy = getOrCreateType(BI.getType(), Unit);
+    if (SeenTypes.find(BaseTy) != SeenTypes.end())
+      continue;
----------------
ruiu wrote:
> zturner wrote:
> > rnk wrote:
> > > IMO `SeenTypes.count(...)` would be more idiomatic.
> > What a silly function.  I wonder why it isn't called `contains()` and 
> > return a `bool`.
> It's probably because std::set doesn't provide `contains()` but `count()` too.
You can use `is_contained` from STLExtras.h, it should be maximally idiomatic :)


https://reviews.llvm.org/D25579



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to