[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

Princeton Ferro via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 19:41:11 PDT 2019


Prince781 added a comment.

In D66122#1626412 <https://reviews.llvm.org/D66122#1626412>, @efriedma wrote:

> This might be a silly question, but what happens if the initializer for a thread-local variable refers to another thread-local variable?  Do you need to initialize both variables?  In what order?


If variable A's initializer references variable B, then it will call B's initializer. So when we call A's initializer, B's initialization completes before A's.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66122





More information about the cfe-commits mailing list