Implement target specific getDebugValueLocation().
[oota-llvm.git] / lib / Target / PowerPC / PPCCodeEmitter.cpp
index 3d8daf7586dde6d2a31f69038fc92fa1e8dfc77f..d03cf05a9ce8b23c41ff443e29189441e8fdb4e9 100644 (file)
@@ -110,9 +110,9 @@ void PPCCodeEmitter::emitBasicBlock(MachineBasicBlock &MBB) {
     default:
       MCE.emitWordBE(getBinaryCodeForInstr(MI));
       break;
-    case TargetOpcode::DBG_LABEL:
+    case TargetOpcode::PROLOG_LABEL:
     case TargetOpcode::EH_LABEL:
-      MCE.emitLabel(MMI->getLabelSym(MI.getOperand(0).getImm()));
+      MCE.emitLabel(MI.getOperand(0).getMCSymbol());
       break;
     case TargetOpcode::IMPLICIT_DEF:
     case TargetOpcode::KILL:
@@ -202,7 +202,7 @@ unsigned PPCCodeEmitter::getMachineOpValue(const MachineInstr &MI,
     MachineRelocation R;
     if (MO.isGlobal()) {
       R = MachineRelocation::getGV(MCE.getCurrentPCOffset(), Reloc,
-                                   MO.getGlobal(), 0,
+                                   const_cast<GlobalValue *>(MO.getGlobal()), 0,
                                    isa<Function>(MO.getGlobal()));
     } else if (MO.isSymbol()) {
       R = MachineRelocation::getExtSym(MCE.getCurrentPCOffset(),