[PATCH] D67837: [CUDA][HIP] Fix assertion in Sema::markKnownEmitted with -fopenmp

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 13:01:01 PDT 2019


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: lib/Sema/Sema.cpp:1511
+    if (Loc != S.DeviceCallGraph.end())
+      S.DeviceCallGraph.erase(Loc);
     return;
----------------
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.


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

https://reviews.llvm.org/D67837





More information about the cfe-commits mailing list