[PATCH] D113743: [RFC][clang][DebugInfo] Allow function-local statics and types to be scoped within a lexical block

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 15 13:06:39 PST 2021


aprantl added a comment.

This looks reasonable to me. Thanks!



================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:234
+  if (!LexicalBlockStack.empty())
+    LexicalBlockMap[&D] = LexicalBlockStack.back();
+}
----------------
maybe use `LexicalBlockMap.insert({&D, LexicalBlockStack.back()});` to make it clear that we are not going to overwrite an entry?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113743



More information about the cfe-commits mailing list