diff options
author | Erich Keane <erich.keane@intel.com> | 2020-09-24 08:52:54 -0700 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2020-09-24 12:09:22 -0700 |
commit | 606a734755d1fb6c35a17680d0c251f834b79334 (patch) | |
tree | 95ac46a170a2b0d50bf839cc82d8d2a5375c203f /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | f2efb5742cc9f74ad73987760651e3d23894a416 (diff) | |
download | llvm-606a734755d1fb6c35a17680d0c251f834b79334.zip llvm-606a734755d1fb6c35a17680d0c251f834b79334.tar.gz llvm-606a734755d1fb6c35a17680d0c251f834b79334.tar.bz2 |
[PR47636] Fix tryEmitPrivate to handle non-constantarraytypes
As mentioned in the bug report, tryEmitPrivate chokes on the
MaterializeTemporaryExpr in the reproducers, since it assumes that if
there are elements, than it must be a ConstantArrayType. However, the
MaterializeTemporaryExpr (which matches exactly the AST when it is NOT a
global/static) has an incomplete array type.
This changes the section where the number-of-elements is non-zero to
properly handle non-CAT types by just extracting it as an array type
(since all we needed was the element type out of it).
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions