Add back #include I messed up
[oota-llvm.git] / lib / CodeGen / MachineInstr.cpp
index 43d0e3c9fa0cecba2b91701a1dea3f01053fa981..b2b3caa0e6c0667554025f414ddfee10990a1afa 100644 (file)
@@ -30,7 +30,7 @@ using namespace llvm;
 // FIXME: This should be a property of the target so that more than one target
 // at a time can be active...
 //
-namespace {
+namespace llvm {
   extern const TargetInstrDescriptor *TargetInstrDescriptors;
 }
 
@@ -107,7 +107,7 @@ void MachineInstr::SetMachineOperandVal(unsigned i,
 void
 MachineInstr::SetMachineOperandConst(unsigned i,
                                      MachineOperand::MachineOperandType opTy,
-                                     int64_t intValue) {
+                                     int intValue) {
   assert(i < getNumOperands());          // must be explicit op
   assert(TargetInstrDescriptors[Opcode].resultPos != (int) i &&
          "immed. constant cannot be defined");
@@ -199,7 +199,7 @@ static inline std::ostream& OutputValue(std::ostream &os, const Value* val) {
 
 static inline void OutputReg(std::ostream &os, unsigned RegNo,
                              const MRegisterInfo *MRI = 0) {
-  if (MRegisterInfo::isPhysicalRegister(RegNo)) {
+  if (!RegNo || MRegisterInfo::isPhysicalRegister(RegNo)) {
     if (MRI)
       os << "%" << MRI->get(RegNo).Name;
     else
@@ -329,6 +329,7 @@ void MachineInstr::print(std::ostream &OS, const TargetMachine &TM) const {
   OS << "\n";
 }
 
+namespace llvm {
 std::ostream &operator<<(std::ostream &os, const MachineInstr &MI) {
   // If the instruction is embedded into a basic block, we can find the target
   // info for the instruction.
@@ -448,3 +449,4 @@ std::ostream &operator<<(std::ostream &OS, const MachineOperand &MO) {
   return OS;
 }
 
+}