[PATCH] D103988: SampleFDO] place the discriminator flag variable into the used list.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 15 16:48:37 PDT 2021
MaskRay added a comment.
CommonLinkage doesn't work.
Whether `appendToUsed` is needed depends on whether the runtime has a live section referencing `__llvm_fs_discriminator__`.
If the runtime has the guarantee, no need for `appendToUsed`.
Otherwise, the first revision `appendToUsed` with `WeakODRLinkage` looks good to me.
`appendToUsed` with `ExternalLinkage` in a comdat works as well, but comdat will need extra code when Mach-O wants this feature.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103988/new/
https://reviews.llvm.org/D103988
More information about the llvm-commits
mailing list