aganea added inline comments.
================ Comment at: lib/CodeGen/CGDebugInfo.cpp:3581 + llvm::DILocalScope *PrevScope = + !LexicalBlockStack.empty() + ? dyn_cast<llvm::DILocalScope>(LexicalBlockStack.back()) ---------------- rnk wrote: > 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? You're right, it was looking too much like smart code. Replaced by a new flag `DynamicInitKind::Global` to make explicit the decision to emit an artificial function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66328/new/ https://reviews.llvm.org/D66328 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits