dblaikie added inline comments.

================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:231-234
+  assert(LexicalBlockMap.find(&D) == LexicalBlockMap.end() &&
+         "D is already mapped to a lexical block scope");
+  if (!LexicalBlockStack.empty())
+    LexicalBlockMap.insert({&D, LexicalBlockStack.back()});
----------------
Rather than doing an extra lookup in the assert, could probably check the 
return value of `insert` instead and assert based on that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125695

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

Reply via email to