[PATCH] D66328: [DebugInfo] Add debug location to stubs generated by CGDeclCXX and mark them as artificial

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 29 14:13:58 PDT 2019


rnk added inline comments.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:3581
+    llvm::DILocalScope *PrevScope =
+        !LexicalBlockStack.empty()
+            ? dyn_cast<llvm::DILocalScope>(LexicalBlockStack.back())
----------------
Is it OK to look up the lexical block stack at this point? The block stack isn't function local, it's part of CGDebugInfo, which is for the whole module, unlike CodeGenFunction. If we start emitting one of these thunks while we're emitting some other function, we could get some strange results. Does anything ensure we've pushed at least one scope by the time we come here?


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

https://reviews.llvm.org/D66328





More information about the cfe-commits mailing list