[llvm-dev] Get constants of undefined types in IR

Iulia Stirb via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 5 10:38:11 PDT 2019


Hi Tim,
Thank you for the answer. I found another solution so I didn't need to use ArrayType for what I intended to do. I did include the DerivedTypes.h from the first place, but the problem was still there and there was no indication about which type is incomplete (I assume ArrayType).

Regards,Iulia
 

    On Wednesday, September 4, 2019, 8:51:40 PM GMT+3, Tim Northover <t.p.northover at gmail.com> wrote:  
 
 Hi Iulia,

On Tue, 3 Sep 2019 at 19:39, Iulia Stirb <iulia_s24 at yahoo.com> wrote:
> ArrayType * AT = ArrayType::get(ET,size);
>
> Internet gives different solutions for this error but none of them was appropriate for this case.
> Could you please help?

I take it that's a Clang error when compiling the code? I'm not
entirely sure, but it's possible you don't have a full definition for
llvm::ArrayType. It's not in the same header as IntegerType, so try
#including DerivedTypes.h.

Otherwise, does it give any indication about which type is incomplete?

Cheers.

Tim.
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190905/a7a3057f/attachment.html>


More information about the llvm-dev mailing list