search for: emitglobalconstantunion

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

2010 Mar 15
0
[LLVMdev] [patch] Writing ConstantUnions
...er.cpp =================================================================== --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp (revision 98552) +++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp (working copy) @@ -1128,6 +1128,21 @@ "Layout of constant struct may be incorrect!"); } +static void EmitGlobalConstantUnion(const ConstantUnion *CU, + unsigned AddrSpace, AsmPrinter &AP) { + const TargetData *TD = AP.TM.getTargetData(); + unsigned Size = TD->getTypeAllocSize(CU->getType()); + + const Constant *Contents = CU->getOperand(0); + unsigned FilledSize = TD-&...
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. --------------