Displaying 2 results from an estimated 2 matches for "h1ti".
Did you mean:
h1t
2020 Sep 30
2
Creating a global variable for a struct array
Let me clarify my question.
I have a struct array h1 as follows:
dhash h1[10];
I want to get a Constant* to variable h1. It looks like I can use ConstantStruct::get(StructType*, ArrayRef<Constant *>) to do this.
My question is how to get the second argument of type ArrayRef<Constant *> from the above variable h1.
Thanks,
Chaitra
________________________________
From: Tim Northover
2020 Oct 01
2
Creating a global variable for a struct array
Thank you very much. The code to initialize h1 to non-zero values was what I was looking for.
It's almost working except for a type mismatch wrt dlist* llist field of h1.
dlist static_lst[10] = { {1, 5, NULL}, ... };
dhash h1[10] = {{"myfile.txt", static_lst}, ... };
Along the lines of the code you had sent, I created a GlobalVariable* llist of type [10 x %struct.dlist]* for the