llvm.org GIT mirror llvm / 6d63a72
Clean up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56300 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
1 changed file(s) with 8 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
4343 namespace {
4444 struct VISIBILITY_HIDDEN ARMAsmPrinter : public AsmPrinter {
4545 ARMAsmPrinter(raw_ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
46 : AsmPrinter(O, TM, T), DW(O, this, T), MMI(NULL), AFI(NULL),
46 : AsmPrinter(O, TM, T), DW(O, this, T), MMI(NULL), AFI(NULL), MCP(NULL),
4747 InCPMode(false) {
4848 Subtarget = &TM.getSubtarget();
4949 }
5656 const ARMSubtarget *Subtarget;
5757
5858 /// AFI - Keep a pointer to ARMFunctionInfo for the current
59 /// MachineFunction
59 /// MachineFunction.
6060 ARMFunctionInfo *AFI;
61
62 /// MCP - Keep a pointer to constantpool entries of the current
63 /// MachineFunction.
64 const MachineConstantPool *MCP;
6165
6266 /// We name each basic block in a Function with a unique number, so
6367 /// that we can consistently refer to them later. This is cleared
184188 ///
185189 bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
186190 AFI = MF.getInfo();
191 MCP = MF.getConstantPool();
187192
188193 SetupMachineFunction(MF);
189194 O << "\n";
669674 assert(!strcmp(Modifier, "cpentry") && "Unknown modifier for CPE");
670675 unsigned CPI = MI->getOperand(OpNo).getIndex();
671676
672 const MachineConstantPoolEntry &MCPE = // Chasing pointers is fun?
673 MI->getParent()->getParent()->getConstantPool()->getConstants()[CPI];
677 const MachineConstantPoolEntry &MCPE = MCP->getConstants()[CPI];
674678
675679 if (MCPE.isMachineConstantPoolEntry()) {
676680 EmitMachineConstantPoolValue(MCPE.Val.MachineCPVal);