search for: usercu

Displaying 2 results from an estimated 2 matches for "usercu".

Did you mean: user_u
2010 Mar 15
0
[LLVMdev] [patch] Writing ConstantUnions
...copy) @@ -293,6 +293,8 @@ } else if (ConstantStruct *UserCS = dyn_cast<ConstantStruct>(UserC)) { NewC = ConstantStruct::get(Context, &NewOps[0], NewOps.size(), UserCS->getType()->isPacked()); + } else if (ConstantUnion *UserCU = dyn_cast<ConstantUnion>(UserC)) { + NewC = ConstantUnion::get(UserCU->getType(), NewOps[0]); } else if (isa<ConstantVector>(UserC)) { NewC = ConstantVector::get(&NewOps[0], NewOps.size()); } else { @@ -1015,6 +1017,11 @@ Elts.push_back(V...
2010 Mar 15
3
[LLVMdev] [patch] Writing ConstantUnions
Hello, I noticed a bit of a gap in the current code for unions: a ConstantUnion cannot be written out to .ll. Hopefully I'm not stepping on Talin's toes by posting this, it's a fairly straightforward adaptation of the code for structs just above. Tim. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. --------------