[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
Fri Feb 21 13:15:59 PST 2020


tejohnson added a comment.

Should there be a verifier check that there is no dso_local on declarations (after this and D74751 <https://reviews.llvm.org/D74751> go in)?



================
Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:186
       GV->eraseFromParent();
+    else if (!GV->isImplicitDSOLocal())
+      GV->setDSOLocal(false);
----------------
Better to do this inside convertToDeclaration, since there are other places we use that to drop definitions. Also logically it belongs there.


================
Comment at: llvm/test/Transforms/ThinLTOBitcodeWriter/split-dsolocal.ll:8
+
+; ERROR: llvm-modextract: error: module index out of range; bitcode file contains 2 module(s)
+
----------------
This checking seems unnecessary in this test.


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