diff options
author | Rui Ueyama <ruiu@google.com> | 2013-06-29 04:28:51 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2013-06-29 04:28:51 +0000 |
commit | 3628b6a7c604b10d5688b08738f1835697ac06da (patch) | |
tree | a350326761f0be0a457669bd8dbb27d68ee538ea /lld/lib | |
parent | 3bad6dd27877ca618142870c2f8116fa0741173a (diff) | |
download | bcm5719-llvm-3628b6a7c604b10d5688b08738f1835697ac06da.tar.gz bcm5719-llvm-3628b6a7c604b10d5688b08738f1835697ac06da.zip |
Move a function into assert() so that GCC won't complain that the
function is not used in release build.
llvm-svn: 185248
Diffstat (limited to 'lld/lib')
-rw-r--r-- | lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp index ba8341ff112..61d864fdce7 100644 --- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp +++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp @@ -266,12 +266,11 @@ private: COFFDefinedAtom *findAtomAt(uint32_t targetOffset, const coff_section *section, const vector<COFFDefinedAtom *> &atoms) const { - auto compareFn = - [](const COFFDefinedAtom * a, const COFFDefinedAtom * b)->bool { - return a->originalOffset() < b->originalOffset(); - } - ; - assert(std::is_sorted(atoms.begin(), atoms.end(), compareFn)); + assert(std::is_sorted(atoms.begin(), atoms.end(), + [](const COFFDefinedAtom * a, + const COFFDefinedAtom * b) -> bool { + return a->originalOffset() < b->originalOffset(); + })); for (COFFDefinedAtom *atom : atoms) if (targetOffset < atom->originalOffset() + atom->size()) |