Displaying 2 results from an estimated 2 matches for "cst_code_aggreg".
2010 Mar 15
0
[LLVMdev] [patch] Writing ConstantUnions
...808,25 @@
else if (isCStr7)
AbbrevToUse = CString7Abbrev;
} else if (isa<ConstantArray>(C) || isa<ConstantStruct>(V) ||
- isa<ConstantUnion>(C) || isa<ConstantVector>(V)) {
+ isa<ConstantVector>(V)) {
Code = bitc::CST_CODE_AGGREGATE;
for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i)
Record.push_back(VE.getValueID(C->getOperand(i)));
AbbrevToUse = AggregateAbbrev;
+ } else if (isa<ConstantUnion>(C)) {
+ Code = bitc::CST_CODE_AGGREGATE;
+
+ // Unions only have one entry...
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.
--------------