aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-02-27 10:25:31 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2020-03-13 19:28:45 +0000
commit994c071a1b7eee8de132d78286c730da2be2c48f (patch)
treeb94b595cb229a159b2626b2d4df666af1f82cadc /llvm/lib
parent8c5c60a493ca31c7e808ca48a99ed4bd5900b43d (diff)
downloadllvm-994c071a1b7eee8de132d78286c730da2be2c48f.zip
llvm-994c071a1b7eee8de132d78286c730da2be2c48f.tar.gz
llvm-994c071a1b7eee8de132d78286c730da2be2c48f.tar.bz2
[Sema][SVE] Reject arrays of sizeless types
The SVE ACLE doesn't allow arrays of sizeless types. At the moment clang accepts the TU: __SVInt8_t x[2]; but trying to code-generate it triggers the LLVM assertion: llvm/lib/IR/Type.cpp:588: static llvm::ArrayType* llvm::ArrayType::get(llvm::Type*, uint64_t): Assertion `isValidElementType(ElementType) && "Invalid type for array element!"' failed. This patch reports an appropriate error instead. The rules are slightly more restrictive than for general incomplete types. For example: struct s; typedef struct s arr[2]; is valid as far as it goes, whereas arrays of sizeless types are invalid in all contexts. BuildArrayType therefore needs a specific check for isSizelessType in addition to the usual handling of incomplete types. Differential Revision: https://reviews.llvm.org/D76082
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions