[PATCH] D95329: [llvm-link] Fix crash when materializing appending global

Sergey Dmitriev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 25 17:26:28 PST 2021


sdmitriev added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/ValueMapper.cpp:825
+      // need to be extracted and updated before the call.
+      SmallVector<Constant *, 16> Inits(drop_begin(AppendingInits, PrefixSize));
+      AppendingInits.resize(PrefixSize);
----------------
tra wrote:
> What's the typical number of inits do you expect to see in practice? 
> Presumably, it's smaller than that of `AppendingInits` itself, which is 16. 
I have renamed `Inits` to `NewInits` in the updated patch and reduced its size to 8.


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

https://reviews.llvm.org/D95329



More information about the llvm-commits mailing list