Analysis: only query size of sized objects.
authorTim Northover <t.p.northover@gmail.com>
Wed, 14 Oct 2020 10:38:01 +0000 (11:38 +0100)
committerTim Northover <t.p.northover@gmail.com>
Wed, 14 Oct 2020 11:16:05 +0000 (12:16 +0100)
commit630d2647986aa6d672dce184460d7ca3349eb006
tree1c6005f462a5710c68e3984e9944e21af46b590a
parentaf5be38a01031ed3d9a9690c4ed881fbe781111f
Analysis: only query size of sized objects.

Recently we started looking into sret parameters, though the issue could crop
up elsewhere. If the pointee type is opaque, we should not try to compute its
size because that leads to an assertion failure.
llvm/lib/Analysis/MemoryBuiltins.cpp
llvm/test/Transforms/InstCombine/object-size-opaque.ll [new file with mode: 0644]