Add an assert to check atom ordinal.
No two atoms are allowed to have the same file and atom ordinals. If there's such atoms, there's a bug in the reader. llvm-svn: 227504
This commit is contained in:
parent
dafc2ae1ad
commit
c10c4c9d9b
|
@ -42,6 +42,7 @@ static bool compareByPosition(const DefinedAtom *lhs, const DefinedAtom *rhs) {
|
|||
const File *rhsFile = &rhs->file();
|
||||
if (lhsFile->ordinal() != rhsFile->ordinal())
|
||||
return lhsFile->ordinal() < rhsFile->ordinal();
|
||||
assert(lhs->ordinal() != rhs->ordinal());
|
||||
return lhs->ordinal() < rhs->ordinal();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue