rjmccall added inline comments.

================
Comment at: lib/Sema/Sema.cpp:1511
+    if (Loc != S.DeviceCallGraph.end())
+      S.DeviceCallGraph.erase(Loc);
     return;
----------------
yaxunl wrote:
> rjmccall wrote:
> > There's an overload of `DenseMap::erase` that just takes a key value, so 
> > this whole thing can be `S.DeviceCallGraph.erase(OrigCallee);`.
> > 
> > Why do we need to erase the entry instead of re-using it?  If the call 
> > graphs are different for the two use-cases, is that conflict a problem for 
> > other reasons?
> I think you are right. we should reuse the call graph.
Okay.  I believe DenseMap has a `count` that tells you how many entries there 
are for a key.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67837/new/

https://reviews.llvm.org/D67837



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

Reply via email to