Use a better name for the label relocations while emitting them for Jump Tables

llvm-svn: 76334
This commit is contained in:
Bruno Cardoso Lopes 2009-07-18 20:52:11 +00:00
parent f53e82f48a
commit fc0fe7ea20
4 changed files with 6 additions and 5 deletions

View File

@ -106,7 +106,7 @@ namespace llvm {
/// getJumpTableRelocationTy - Returns the machine relocation type used
/// to reference a jumptable.
virtual unsigned getJumpTableMachineRelocationTy() const = 0;
virtual unsigned getAbsoluteLabelMachineRelTy() const = 0;
};
} // end llvm namespace

View File

@ -185,7 +185,7 @@ void ELFCodeEmitter::emitJumpTables(MachineJumpTableInfo *MJTI) {
// Each MBB entry in the Jump table section has a relocation entry
// against the current text section.
for (unsigned mi = 0, me = MBBs.size(); mi != me; ++mi) {
unsigned MachineRelTy = TEW->getJumpTableMachineRelocationTy();
unsigned MachineRelTy = TEW->getAbsoluteLabelMachineRelTy();
MachineRelocation MR =
MachineRelocation::getBB(JTSection.size(),
MachineRelTy,

View File

@ -102,7 +102,8 @@ unsigned X86ELFWriterInfo::getRelocationTySize(unsigned RelTy) const {
return 0;
}
unsigned X86ELFWriterInfo::getJumpTableMachineRelocationTy() const {
return X86::reloc_absolute_dword;
unsigned X86ELFWriterInfo::getAbsoluteLabelMachineRelTy() const {
return is64Bit ?
X86::reloc_absolute_dword : X86::reloc_absolute_word;
}

View File

@ -58,7 +58,7 @@ namespace llvm {
/// getJumpTableRelocationTy - Returns the machine relocation type used
/// to reference a jumptable.
virtual unsigned getJumpTableMachineRelocationTy() const;
virtual unsigned getAbsoluteLabelMachineRelTy() const;
};
} // end llvm namespace