[PATCH] D70006: [ThinLTO] Fix bug when importing writeonly variables
Eugene Leviant via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 08:08:01 PST 2019
evgeny777 marked an inline comment as done.
evgeny777 added a comment.
evgeny777 added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/FunctionImportUtils.cpp:261
+ auto *VTy = V->getValueType();
+ if (VTy->isStructTy() || VTy->isArrayTy())
+ V->setInitializer(ConstantAggregateZero::get(VTy));
----------------
tejohnson wrote:
> What if it isn't a struct or array? Is that the only situation where we can hit this problem?
Looks like you're right. I'll replace with Constant::getNullValue and update the patch
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70006/new/
https://reviews.llvm.org/D70006
More information about the llvm-commits
mailing list