projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dafc2ae
)
Add an assert to check atom ordinal.
author
Rui Ueyama
<ruiu@google.com>
Thu, 29 Jan 2015 22:39:43 +0000
(22:39 +0000)
committer
Rui Ueyama
<ruiu@google.com>
Thu, 29 Jan 2015 22:39:43 +0000
(22:39 +0000)
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
lld/lib/ReaderWriter/PECOFF/OrderPass.h
patch
|
blob
|
history
diff --git
a/lld/lib/ReaderWriter/PECOFF/OrderPass.h
b/lld/lib/ReaderWriter/PECOFF/OrderPass.h
index
8f8b408
..
c1dc5c6
100644
(file)
--- a/
lld/lib/ReaderWriter/PECOFF/OrderPass.h
+++ b/
lld/lib/ReaderWriter/PECOFF/OrderPass.h
@@
-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();
}