Andrew Lenharth | 0126952 | 2005-01-24 18:37:48 +0000 | [diff] [blame] | 1 | //===-- AlphaAsmPrinter.cpp - Alpha LLVM assembly writer ------------------===// |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 2 | // |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file was developed by the LLVM research group and is distributed under |
| 6 | // the University of Illinois Open Source License. See LICENSE.TXT for details. |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 7 | // |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file contains a printer that converts from our internal representation |
| 11 | // of machine-dependent LLVM code to GAS-format Alpha assembly language. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #include "Alpha.h" |
| 16 | #include "AlphaInstrInfo.h" |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame^] | 17 | #include "AlphaTargetMachine.h" |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 18 | #include "llvm/Module.h" |
Chris Lattner | 5b3a455 | 2005-03-17 15:38:16 +0000 | [diff] [blame] | 19 | #include "llvm/Type.h" |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 20 | #include "llvm/Assembly/Writer.h" |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 21 | #include "llvm/CodeGen/MachineConstantPool.h" |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 22 | #include "llvm/CodeGen/ValueTypes.h" |
| 23 | #include "llvm/CodeGen/AsmPrinter.h" |
| 24 | |
| 25 | #include "llvm/Target/TargetMachine.h" |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 26 | |
| 27 | #include "llvm/Support/Mangler.h" |
| 28 | #include "llvm/ADT/Statistic.h" |
Andrew Lenharth | 3ae1829 | 2005-04-14 16:24:00 +0000 | [diff] [blame] | 29 | #include "llvm/Support/CommandLine.h" |
Andrew Lenharth | 0126952 | 2005-01-24 18:37:48 +0000 | [diff] [blame] | 30 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 31 | using namespace llvm; |
| 32 | |
| 33 | namespace { |
| 34 | Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); |
| 35 | |
| 36 | struct AlphaAsmPrinter : public AsmPrinter { |
| 37 | |
| 38 | /// Unique incrementer for label values for referencing Global values. |
| 39 | /// |
| 40 | unsigned LabelNumber; |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 41 | |
| 42 | AlphaAsmPrinter(std::ostream &o, TargetMachine &tm) |
Andrew Lenharth | 440e688 | 2005-02-04 14:09:38 +0000 | [diff] [blame] | 43 | : AsmPrinter(o, tm), LabelNumber(0) |
| 44 | { |
| 45 | AlignmentIsInBytes = false; |
| 46 | } |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 47 | |
| 48 | /// We name each basic block in a Function with a unique number, so |
| 49 | /// that we can consistently refer to them later. This is cleared |
| 50 | /// at the beginning of each call to runOnMachineFunction(). |
| 51 | /// |
| 52 | typedef std::map<const Value *, unsigned> ValueMapTy; |
| 53 | ValueMapTy NumberForBB; |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 54 | std::string CurSection; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 55 | |
| 56 | virtual const char *getPassName() const { |
| 57 | return "Alpha Assembly Printer"; |
| 58 | } |
| 59 | bool printInstruction(const MachineInstr *MI); |
| 60 | void printOp(const MachineOperand &MO, bool IsCallOp = false); |
| 61 | void printConstantPool(MachineConstantPool *MCP); |
| 62 | void printOperand(const MachineInstr *MI, int opNum, MVT::ValueType VT); |
| 63 | void printBaseOffsetPair (const MachineInstr *MI, int i, bool brackets=true); |
| 64 | void printMachineInstruction(const MachineInstr *MI); |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 65 | bool runOnMachineFunction(MachineFunction &F); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 66 | bool doInitialization(Module &M); |
| 67 | bool doFinalization(Module &M); |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 68 | void SwitchSection(std::ostream &OS, const char *NewSection); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 69 | }; |
| 70 | } // end of anonymous namespace |
| 71 | |
| 72 | /// createAlphaCodePrinterPass - Returns a pass that prints the Alpha |
| 73 | /// assembly code for a MachineFunction to the given output stream, |
| 74 | /// using the given target machine description. This should work |
| 75 | /// regardless of whether the function is in SSA form. |
| 76 | /// |
| 77 | FunctionPass *llvm::createAlphaCodePrinterPass (std::ostream &o, |
| 78 | TargetMachine &tm) { |
| 79 | return new AlphaAsmPrinter(o, tm); |
| 80 | } |
| 81 | |
| 82 | #include "AlphaGenAsmWriter.inc" |
| 83 | |
| 84 | void AlphaAsmPrinter::printOperand(const MachineInstr *MI, int opNum, MVT::ValueType VT) |
| 85 | { |
| 86 | const MachineOperand &MO = MI->getOperand(opNum); |
| 87 | if (MO.getType() == MachineOperand::MO_MachineRegister) { |
| 88 | assert(MRegisterInfo::isPhysicalRegister(MO.getReg())&&"Not physreg??"); |
Andrew Lenharth | 0126952 | 2005-01-24 18:37:48 +0000 | [diff] [blame] | 89 | O << TM.getRegisterInfo()->get(MO.getReg()).Name; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 90 | } else if (MO.isImmediate()) { |
| 91 | O << MO.getImmedValue(); |
| 92 | } else { |
| 93 | printOp(MO); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | |
| 98 | void AlphaAsmPrinter::printOp(const MachineOperand &MO, bool IsCallOp) { |
| 99 | const MRegisterInfo &RI = *TM.getRegisterInfo(); |
| 100 | int new_symbol; |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 101 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 102 | switch (MO.getType()) { |
| 103 | case MachineOperand::MO_VirtualRegister: |
| 104 | if (Value *V = MO.getVRegValueOrNull()) { |
| 105 | O << "<" << V->getName() << ">"; |
| 106 | return; |
| 107 | } |
| 108 | // FALLTHROUGH |
| 109 | case MachineOperand::MO_MachineRegister: |
| 110 | case MachineOperand::MO_CCRegister: |
Andrew Lenharth | 0126952 | 2005-01-24 18:37:48 +0000 | [diff] [blame] | 111 | O << RI.get(MO.getReg()).Name; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 112 | return; |
| 113 | |
| 114 | case MachineOperand::MO_SignExtendedImmed: |
| 115 | case MachineOperand::MO_UnextendedImmed: |
| 116 | std::cerr << "printOp() does not handle immediate values\n"; |
| 117 | abort(); |
| 118 | return; |
| 119 | |
| 120 | case MachineOperand::MO_PCRelativeDisp: |
Andrew Lenharth | 0126952 | 2005-01-24 18:37:48 +0000 | [diff] [blame] | 121 | std::cerr << "Shouldn't use addPCDisp() when building Alpha MachineInstrs"; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 122 | abort(); |
| 123 | return; |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 124 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 125 | case MachineOperand::MO_MachineBasicBlock: { |
| 126 | MachineBasicBlock *MBBOp = MO.getMachineBasicBlock(); |
Andrew Lenharth | eee2a88 | 2005-06-06 19:03:09 +0000 | [diff] [blame] | 127 | O << "$LBB" << Mang->getValueName(MBBOp->getParent()->getFunction()) |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 128 | << "_" << MBBOp->getNumber() << "\t" << CommentString << " " |
| 129 | << MBBOp->getBasicBlock()->getName(); |
| 130 | return; |
| 131 | } |
| 132 | |
| 133 | case MachineOperand::MO_ConstantPoolIndex: |
Andrew Lenharth | 98f0eee | 2005-06-27 16:29:54 +0000 | [diff] [blame] | 134 | O << "$CPI" << CurrentFnName << "_" << MO.getConstantPoolIndex(); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 135 | return; |
| 136 | |
| 137 | case MachineOperand::MO_ExternalSymbol: |
| 138 | O << MO.getSymbolName(); |
| 139 | return; |
| 140 | |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 141 | case MachineOperand::MO_GlobalAddress: |
| 142 | //Abuse PCrel to specify pcrel calls |
| 143 | //calls are the only thing that use this flag |
| 144 | if (MO.isPCRelative()) |
| 145 | O << "$" << Mang->getValueName(MO.getGlobal()) << "..ng"; |
| 146 | else |
| 147 | O << Mang->getValueName(MO.getGlobal()); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 148 | return; |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 149 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 150 | default: |
| 151 | O << "<unknown operand type: " << MO.getType() << ">"; |
| 152 | return; |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | /// printMachineInstruction -- Print out a single Alpha MI to |
| 157 | /// the current output stream. |
| 158 | /// |
| 159 | void AlphaAsmPrinter::printMachineInstruction(const MachineInstr *MI) { |
| 160 | ++EmittedInsts; |
| 161 | if (printInstruction(MI)) |
| 162 | return; // Printer was automatically generated |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 163 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 164 | assert(0 && "Unhandled instruction in asm writer!"); |
| 165 | abort(); |
| 166 | return; |
| 167 | } |
| 168 | |
| 169 | |
| 170 | /// runOnMachineFunction - This uses the printMachineInstruction() |
| 171 | /// method to print assembly for each instruction. |
| 172 | /// |
| 173 | bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) { |
| 174 | setupMachineFunction(MF); |
| 175 | O << "\n\n"; |
| 176 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 177 | // Print out constants referenced by the function |
| 178 | printConstantPool(MF.getConstantPool()); |
| 179 | |
| 180 | // Print out labels for the function. |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 181 | SwitchSection(O, "text"); |
| 182 | emitAlignment(4); |
Andrew Lenharth | 044f31f | 2005-05-27 03:39:30 +0000 | [diff] [blame] | 183 | O << "\t.globl " << CurrentFnName << "\n"; |
| 184 | O << "\t.ent " << CurrentFnName << "\n"; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 185 | |
| 186 | O << CurrentFnName << ":\n"; |
| 187 | |
| 188 | // Print out code for the function. |
| 189 | for (MachineFunction::const_iterator I = MF.begin(), E = MF.end(); |
| 190 | I != E; ++I) { |
| 191 | // Print a label for the basic block. |
Andrew Lenharth | eee2a88 | 2005-06-06 19:03:09 +0000 | [diff] [blame] | 192 | O << "$LBB" << CurrentFnName << "_" << I->getNumber() << ":\t" |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 193 | << CommentString << " " << I->getBasicBlock()->getName() << "\n"; |
| 194 | for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end(); |
| 195 | II != E; ++II) { |
| 196 | // Print the assembly for the instruction. |
| 197 | O << "\t"; |
| 198 | printMachineInstruction(II); |
| 199 | } |
| 200 | } |
| 201 | ++LabelNumber; |
| 202 | |
Andrew Lenharth | 2b6c4f5 | 2005-02-25 22:55:15 +0000 | [diff] [blame] | 203 | O << "\t.end " << CurrentFnName << "\n"; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 204 | |
| 205 | // We didn't modify anything. |
| 206 | return false; |
| 207 | } |
| 208 | |
| 209 | |
| 210 | /// printConstantPool - Print to the current output stream assembly |
| 211 | /// representations of the constants in the constant pool MCP. This is |
| 212 | /// used to print out constants which have been "spilled to memory" by |
| 213 | /// the code generator. |
| 214 | /// |
| 215 | void AlphaAsmPrinter::printConstantPool(MachineConstantPool *MCP) { |
| 216 | const std::vector<Constant*> &CP = MCP->getConstants(); |
| 217 | const TargetData &TD = TM.getTargetData(); |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 218 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 219 | if (CP.empty()) return; |
| 220 | |
Andrew Lenharth | 21e786b | 2005-08-12 16:13:43 +0000 | [diff] [blame] | 221 | SwitchSection(O, "rodata"); |
Andrew Lenharth | f61ed95 | 2005-02-01 20:38:53 +0000 | [diff] [blame] | 222 | for (unsigned i = 0, e = CP.size(); i != e; ++i) { |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 223 | // SwitchSection(O, "section .rodata, \"dr\""); |
Andrew Lenharth | f61ed95 | 2005-02-01 20:38:53 +0000 | [diff] [blame] | 224 | emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType())); |
Andrew Lenharth | 98f0eee | 2005-06-27 16:29:54 +0000 | [diff] [blame] | 225 | O << "$CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString |
Andrew Lenharth | f61ed95 | 2005-02-01 20:38:53 +0000 | [diff] [blame] | 226 | << *CP[i] << "\n"; |
| 227 | emitGlobalConstant(CP[i]); |
| 228 | } |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | bool AlphaAsmPrinter::doInitialization(Module &M) |
| 232 | { |
| 233 | AsmPrinter::doInitialization(M); |
Andrew Lenharth | 120ab48 | 2005-09-29 22:54:56 +0000 | [diff] [blame^] | 234 | if(TM.getSubtarget<AlphaSubtarget>().hasF2I() |
| 235 | || TM.getSubtarget<AlphaSubtarget>().hasCT()) |
Andrew Lenharth | 3ae1829 | 2005-04-14 16:24:00 +0000 | [diff] [blame] | 236 | O << "\t.arch ev6\n"; |
| 237 | else |
| 238 | O << "\t.arch ev56\n"; |
Andrew Lenharth | 0934ae0 | 2005-07-22 20:52:16 +0000 | [diff] [blame] | 239 | O << "\t.set noat\n"; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 240 | return false; |
| 241 | } |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 242 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 243 | |
| 244 | // SwitchSection - Switch to the specified section of the executable if we are |
| 245 | // not already in it! |
| 246 | // |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 247 | void AlphaAsmPrinter::SwitchSection(std::ostream &OS, const char *NewSection) |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 248 | { |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 249 | if (CurSection != NewSection) { |
| 250 | CurSection = NewSection; |
| 251 | if (!CurSection.empty()) |
Andrew Lenharth | 21e786b | 2005-08-12 16:13:43 +0000 | [diff] [blame] | 252 | OS << "\t.section ." << NewSection << "\n"; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 253 | } |
| 254 | } |
| 255 | |
| 256 | bool AlphaAsmPrinter::doFinalization(Module &M) { |
| 257 | const TargetData &TD = TM.getTargetData(); |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 258 | |
Chris Lattner | e4d5c44 | 2005-03-15 04:54:21 +0000 | [diff] [blame] | 259 | for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 260 | if (I->hasInitializer()) { // External global require no code |
| 261 | O << "\n\n"; |
| 262 | std::string name = Mang->getValueName(I); |
| 263 | Constant *C = I->getInitializer(); |
| 264 | unsigned Size = TD.getTypeSize(C->getType()); |
| 265 | unsigned Align = TD.getTypeAlignmentShift(C->getType()); |
| 266 | |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 267 | if (C->isNullValue() && |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 268 | (I->hasLinkOnceLinkage() || I->hasInternalLinkage() || |
| 269 | I->hasWeakLinkage() /* FIXME: Verify correct */)) { |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 270 | SwitchSection(O, "data"); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 271 | if (I->hasInternalLinkage()) |
| 272 | O << "\t.local " << name << "\n"; |
Misha Brukman | 4633f1c | 2005-04-21 23:13:11 +0000 | [diff] [blame] | 273 | |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 274 | O << "\t.comm " << name << "," << TD.getTypeSize(C->getType()) |
| 275 | << "," << (1 << Align); |
| 276 | O << "\t\t# "; |
| 277 | WriteAsOperand(O, I, true, true, &M); |
| 278 | O << "\n"; |
| 279 | } else { |
| 280 | switch (I->getLinkage()) { |
| 281 | case GlobalValue::LinkOnceLinkage: |
| 282 | case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak. |
| 283 | // Nonnull linkonce -> weak |
| 284 | O << "\t.weak " << name << "\n"; |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 285 | SwitchSection(O, ""); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 286 | O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\",@progbits\n"; |
| 287 | break; |
| 288 | case GlobalValue::AppendingLinkage: |
| 289 | // FIXME: appending linkage variables should go into a section of |
| 290 | // their name or something. For now, just emit them as external. |
| 291 | case GlobalValue::ExternalLinkage: |
| 292 | // If external or appending, declare as a global symbol |
| 293 | O << "\t.globl " << name << "\n"; |
| 294 | // FALL THROUGH |
| 295 | case GlobalValue::InternalLinkage: |
| 296 | if (C->isNullValue()) |
Andrew Lenharth | 21e786b | 2005-08-12 16:13:43 +0000 | [diff] [blame] | 297 | SwitchSection(O, "bss"); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 298 | else |
Andrew Lenharth | c24b537 | 2005-04-13 17:17:28 +0000 | [diff] [blame] | 299 | SwitchSection(O, "data"); |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 300 | break; |
| 301 | case GlobalValue::GhostLinkage: |
Andrew Lenharth | 3dc15f3 | 2005-03-10 19:02:02 +0000 | [diff] [blame] | 302 | std::cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n"; |
Andrew Lenharth | 304d0f3 | 2005-01-22 23:41:55 +0000 | [diff] [blame] | 303 | abort(); |
| 304 | } |
| 305 | |
| 306 | emitAlignment(Align); |
| 307 | O << "\t.type " << name << ",@object\n"; |
| 308 | O << "\t.size " << name << "," << Size << "\n"; |
| 309 | O << name << ":\t\t\t\t# "; |
| 310 | WriteAsOperand(O, I, true, true, &M); |
| 311 | O << " = "; |
| 312 | WriteAsOperand(O, C, false, false, &M); |
| 313 | O << "\n"; |
| 314 | emitGlobalConstant(C); |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | AsmPrinter::doFinalization(M); |
| 319 | return false; |
| 320 | } |