Change from using MachineRelocation ctors to using static methods

in MachineRelocation to create Relocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-05-03 20:30:20 +00:00
parent d2d5c76753
commit 5a032de387
4 changed files with 54 additions and 27 deletions

View File

@@ -215,15 +215,15 @@ int AlphaCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) {
abort();
}
if (MO.isGlobalAddress())
MCE.addRelocation(MachineRelocation((unsigned)MCE.getCurrentPCOffset(),
MCE.addRelocation(MachineRelocation::getGV(MCE.getCurrentPCOffset(),
Reloc, MO.getGlobal(), Offset,
false, useGOT));
else if (MO.isExternalSymbol())
MCE.addRelocation(MachineRelocation((unsigned)MCE.getCurrentPCOffset(),
MCE.addRelocation(MachineRelocation::getExtSym(MCE.getCurrentPCOffset(),
Reloc, MO.getSymbolName(), Offset,
true));
else
MCE.addRelocation(MachineRelocation((unsigned)MCE.getCurrentPCOffset(),
MCE.addRelocation(MachineRelocation::getConstPool(MCE.getCurrentPCOffset(),
Reloc, MO.getConstantPoolIndex(),
Offset));
} else if (MO.isMachineBasicBlock()) {