[PATCH] D97446: Change some addUsedGlobal to addUsedOrCompilerUsedGlobal

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 13 15:03:05 PST 2022


rjmccall added a comment.

In D97446#3241828 <https://reviews.llvm.org/D97446#3241828>, @JonChesterfield wrote:

> I'd much refer we put variables in arrays corresponding to their intended lifespan instead of the binary format they're destined for.

I agree that LLVM features should generally mean something consistent across targets, and frontends should use the appropriate feature for the semantics they require.  Here the problem is that, for better or worse, the source language has different semantics on different targets.  Historically, that really has been driven by object format and the corresponding presumed linker behavior; I don't know where to begin answering the question of whether we should treat it as a platform difference instead when targeting a non-standard object format.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97446



More information about the cfe-commits mailing list