summaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-15 18:22:01 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-15 18:22:01 +0000
commit4ef61f2ad4ff509ee05c7051d359009511f81226 (patch)
treee6c816c11259d210dbe2c5518f3c4d217d1d5a59 /include/llvm
parent9d86f9cc3ab4db75b388c2761bf3dd205f84a6d8 (diff)
downloadllvm-4ef61f2ad4ff509ee05c7051d359009511f81226.tar.gz
llvm-4ef61f2ad4ff509ee05c7051d359009511f81226.tar.bz2
llvm-4ef61f2ad4ff509ee05c7051d359009511f81226.tar.xz
Cleanup relocation sorting for ELF.
We want the order to be deterministic on all platforms. NAKAMURA Takumi fixed that in r181864. This patch is just two small cleanups: * Move the function to the cpp file. It is only passed to array_pod_sort. * Remove the ppc implementation which is now redundant git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/MC/MCELFObjectWriter.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/llvm/MC/MCELFObjectWriter.h b/include/llvm/MC/MCELFObjectWriter.h
index f8470ecdc5..92ad1b1a46 100644
--- a/include/llvm/MC/MCELFObjectWriter.h
+++ b/include/llvm/MC/MCELFObjectWriter.h
@@ -42,18 +42,6 @@ struct ELFRelocationEntry {
const MCSymbol *Sym, uint64_t Addend, const MCFixup &Fixup)
: r_offset(RelocOffset), Index(Idx), Type(RelType), Symbol(Sym),
r_addend(Addend), Fixup(&Fixup) {}
-
- // Support lexicographic sorting.
- bool operator<(const ELFRelocationEntry &RE) const {
- if (RE.r_offset != r_offset)
- return RE.r_offset < r_offset;
- if (Type != RE.Type)
- return Type < RE.Type;
- if (Index != RE.Index)
- return Index < RE.Index;
- llvm_unreachable("ELFRelocs might be unstable!");
- return 0;
- }
};
class MCELFObjectTargetWriter {