[PATCH] D74749: ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 18:03:11 PST 2020


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:993
     GV.replaceAllUsesWith(NewGV);
     return false;
   }
----------------
MaskRay wrote:
> tejohnson wrote:
> > Don't we also need it here (alias case)?
> GlobalAlias does not need it, but I'll add a test case that an `alias` works.
> 
> I will also add a hidden GlobalVariable case. If we don't check `if (!GV.isImplicitDSOLocal())`, setting a hidden GlobalVariable declaration dso_preemptable will trigger a verifier error (`IR/Verifier.cpp:visitGlobalValue`).
Oh ic why, because we create a new decl without it in the alias case. Nevermind.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74749





More information about the llvm-commits mailing list