Displaying 4 results from an estimated 4 matches for "newstru".
Did you mean:
newstruc
2005 Mar 16
1
[LLVMdev] Dynamic Creation of a simple program
Hi,
Given these C instructions:
==============================
struct stru { struct stru *Next; };
struct list *NewStru = malloc ( sizeof ( struct stru ) );
struct list *tmp.3;
...
tmp.3 = NewStru->Next;
==============================
LLVM generates something like this:
%tmp.0 = malloc %struct.stru ; <%struct.stru*>
%tmp.3 = getelementptr %struct.stru* %tmp.0, int 0, uint 1 ; <%struct.stru**>
I...
2005 Mar 16
2
[LLVMdev] Dynamic Creation of a simple program
...ses
Thanks for your help!
--- Misha Brukman <brukman at uiuc.edu> wrote:
> On Tue, Mar 15, 2005 at 05:59:06PM -0800, xavier wrote:
> > Given these C instructions:
> > ==============================
> > struct stru { struct stru *Next; };
> > struct list *NewStru = malloc ( sizeof ( struct stru ) );
> > struct list *tmp.3;
> > tmp.3 = NewStru->Next;
> > ==============================
> > LLVM generates something like this:
> > %tmp.0 = malloc %struct.stru ; <%struct.stru*>
> > %tmp.3 = getelementptr %struct.str...
2005 Mar 15
0
[LLVMdev] Dynamic Creation of a simple program
On Tue, 15 Mar 2005, xavier wrote:
> Thanks for the information
> I am trying to use one of your examples for recursive data structures:
>
> =========================
> PATypeHolder StructTy = OpaqueType::get();
> std::vector<const Type*> Elts;
> Elts.push_back(PointerType::get(StructTy));
> Elts.push_back(PointerType::get(Type::SByteTy));
> StructType *NewSTy =
2005 Mar 15
2
[LLVMdev] Dynamic Creation of a simple program
Thanks for the information
I am trying to use one of your examples for recursive data structures:
=========================
PATypeHolder StructTy = OpaqueType::get();
std::vector<const Type*> Elts;
Elts.push_back(PointerType::get(StructTy));
Elts.push_back(PointerType::get(Type::SByteTy));
StructType *NewSTy = StructType::get(Elts);
// At this point, NewSTy = "{ opaque*, sbyte*