- O << "\t.data\n";
- O << "\t.globl " << name << "\n";
- O << "\t.type " << name << ",@object\n";
- O << "\t.size " << name << ","
- << (unsigned)TD.getTypeSize(I->getType()) << "\n";
- O << "\t.align " << (unsigned)TD.getTypeAlignment(C->getType()) << "\n";
- O << name << ":\t\t\t\t\t#";
- // If this is a constant function pointer, we only print out the
- // name of the function in the comment (because printing the
- // function means calling AsmWriter to print the whole LLVM
- // assembly, which would corrupt the X86 assembly output.)
- // Otherwise we print out the whole llvm value as a comment.
- if (const Function *F = isConstantFunctionPointerRef (C)) {
- O << " %" << F->getName() << "()\n";
+ if (C->isNullValue()) {
+ O << "\n\n\t.comm " << name << "," << TD.getTypeSize(C->getType())
+ << "," << (unsigned)TD.getTypeAlignment(C->getType());
+ O << "\t\t# ";
+ WriteAsOperand(O, I, true, true, &M);
+ O << "\n";