-/// EmitXXStructorList - Emit the ctor or dtor list. On darwin, this just
-/// prints out the function pointers.
-void DarwinAsmPrinter::EmitXXStructorList(Constant *List) {
- // Should be an array of '{ int, void ()* }' structs. The first value is the
- // init priority, which we ignore.
- if (!isa<ConstantArray>(List)) return;
- ConstantArray *InitList = cast<ConstantArray>(List);
- for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
- if (ConstantStruct *CS = dyn_cast<ConstantStruct>(InitList->getOperand(i))){
- if (CS->getNumOperands() != 2) return; // Not array of 2-element structs.
- // Emit the function pointer.
- EmitGlobalConstant(CS->getOperand(1));
- }
-}
-