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

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 20 09:50:33 PDT 2019


rjmccall added inline comments.


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


Repository:
  rC Clang

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

https://reviews.llvm.org/D67837





More information about the cfe-commits mailing list