[PATCH] D134784: [IR] Don't allow DLL storage-class and local linkage
ben via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 06:56:22 PDT 2022
bd1976llvm marked 3 inline comments as done.
bd1976llvm added a comment.
Thanks for the review. I addressed your comments and also consolidated the tests into a single test using split-file.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6017
+ // Prevent InternalLinkage) globals getting assigned a dllimport or dllexport.
+ if (Linkage != llvm::GlobalVariable::InternalLinkage) {
+ setGVProperties(GV, VD);
----------------
MaskRay wrote:
> `llvm::GlobalValue::isLocalLinkage(Linkage)` ?
>
>
>
> This change is to make `CodeGenCXX/reference-temporary-ms.cpp` work
Thanks. Yes, CodeGenCXX/reference-temporary-ms.cpp will fail without this change. It also just makes sense that we don't need to resolve the properties of a local linkage GV.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134784/new/
https://reviews.llvm.org/D134784
More information about the llvm-commits
mailing list