mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 19:02:35 +00:00
Assert that a cmp function defines a total order.
Thanks to David Blaikie for noticing it. llvm-svn: 257796
This commit is contained in:
parent
33808751c1
commit
5ed565b517
@ -334,9 +334,8 @@ static int cmpRel(const ELFRelocationEntry *AP, const ELFRelocationEntry *BP) {
|
|||||||
const ELFRelocationEntry &B = *BP;
|
const ELFRelocationEntry &B = *BP;
|
||||||
if (A.Offset != B.Offset)
|
if (A.Offset != B.Offset)
|
||||||
return B.Offset - A.Offset;
|
return B.Offset - A.Offset;
|
||||||
if (B.Type != A.Type)
|
assert(B.Type != A.Type && "We don't have a total order");
|
||||||
return A.Type - B.Type;
|
return A.Type - B.Type;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MipsELFObjectWriter::sortRelocs(const MCAssembler &Asm,
|
void MipsELFObjectWriter::sortRelocs(const MCAssembler &Asm,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user