case CallingConv::X86_StdCall:
return "modopt([mscorlib]System.Runtime.CompilerServices.CallConvStdcall) ";
default:
- cerr << "CallingConvID = " << CallingConvID << '\n';
+ errs() << "CallingConvID = " << CallingConvID << '\n';
llvm_unreachable("Unsupported calling convention");
}
return ""; // Not reached
case Type::DoubleTyID:
return "float64 ";
default:
- cerr << "Type = " << *Ty << '\n';
+ errs() << "Type = " << *Ty << '\n';
llvm_unreachable("Invalid primitive type");
}
return ""; // Not reached
return getArrayTypeName(Ty->getTypeID(),Ty);
return "valuetype '"+getArrayTypeName(Ty->getTypeID(),Ty)+"' ";
default:
- cerr << "Type = " << *Ty << '\n';
+ errs() << "Type = " << *Ty << '\n';
llvm_unreachable("Invalid type in getTypeName()");
}
return ""; // Not reached
case Type::PointerTyID:
return "i"+utostr(TD->getTypeAllocSize(Ty));
default:
- cerr << "TypeID = " << Ty->getTypeID() << '\n';
+ errs() << "TypeID = " << Ty->getTypeID() << '\n';
llvm_unreachable("Invalid type in TypeToPostfix()");
}
return ""; // Not reached
printSimpleInstruction("ldc.i4",utostr(N).c_str());
// FIXME: Need overflow test?
if (!isUInt32(N)) {
- cerr << "Value = " << utostr(N) << '\n';
+ errs() << "Value = " << utostr(N) << '\n';
llvm_unreachable("32-bit pointer overflowed");
}
break;
// Undefined constant value = NULL.
printPtrLoad(0);
} else {
- cerr << "Constant = " << *C << '\n';
+ errs() << "Constant = " << *C << '\n';
llvm_unreachable("Invalid constant value");
}
Out << '\n';
printConstantExpr(cast<ConstantExpr>(V));
break;
default:
- cerr << "Value = " << *V << '\n';
+ errs() << "Value = " << *V << '\n';
llvm_unreachable("Invalid value location");
}
}
printSimpleInstruction("stloc",getValueName(V).c_str());
break;
default:
- cerr << "Value = " << *V << '\n';
+ errs() << "Value = " << *V << '\n';
llvm_unreachable("Invalid value location");
}
}
// FIXME: meaning that ld*/st* instruction do not change data format.
break;
default:
- cerr << "Opcode = " << Op << '\n';
+ errs() << "Opcode = " << Op << '\n';
llvm_unreachable("Invalid conversion instruction");
}
}