forked from OSchip/llvm-project
parent
8d79e5c9d9
commit
fb8032dc84
|
|
@ -225,7 +225,7 @@ void Emitter::emitInstruction(MachineInstr &MI) {
|
|||
MCE.emitByte(BaseOpcode + getX86RegNum(MI.getOperand(0).getReg()));
|
||||
if (MI.getNumOperands() == 2) {
|
||||
unsigned Size = 4;
|
||||
if (Value *V = MI.getOperand(1).getVRegValue()) {
|
||||
if (Value *V = MI.getOperand(1).getVRegValueOrNull()) {
|
||||
assert(Size == 4 && "Don't know how to emit non-pointer values!");
|
||||
MCE.emitGlobalAddress(cast<GlobalValue>(V));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static void printOp(std::ostream &O, const MachineOperand &MO,
|
|||
const MRegisterInfo &RI) {
|
||||
switch (MO.getType()) {
|
||||
case MachineOperand::MO_VirtualRegister:
|
||||
if (Value *V = MO.getVRegValue()) {
|
||||
if (Value *V = MO.getVRegValueOrNull()) {
|
||||
O << "<" << V->getName() << ">";
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ void Emitter::emitInstruction(MachineInstr &MI) {
|
|||
MCE.emitByte(BaseOpcode + getX86RegNum(MI.getOperand(0).getReg()));
|
||||
if (MI.getNumOperands() == 2) {
|
||||
unsigned Size = 4;
|
||||
if (Value *V = MI.getOperand(1).getVRegValue()) {
|
||||
if (Value *V = MI.getOperand(1).getVRegValueOrNull()) {
|
||||
assert(Size == 4 && "Don't know how to emit non-pointer values!");
|
||||
MCE.emitGlobalAddress(cast<GlobalValue>(V));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue