[mlir][LLVM] Make the nested type restriction on complex constants less aggressive
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 11 May 2022 13:12:21 +0000 (15:12 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 12 May 2022 09:47:01 +0000 (11:47 +0200)
commit27dad99622bb16fc7ba94beda26dded9023bf2cd
treeb2053d083df4ccd21c756b3b308e4950f474447f
parent2a40cc532bca4646a43ff07e21c131b53f9e4d70
[mlir][LLVM] Make the nested type restriction on complex constants less aggressive

Complex nested in other types is perfectly fine, just nested structs
aren't supported. Instead of checking whether there's nesting just check
whether the struct we're dealing with is a complex number.

Differential Revision: https://reviews.llvm.org/D125381
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
mlir/test/Target/LLVMIR/llvmir-invalid.mlir
mlir/test/Target/LLVMIR/llvmir.mlir