[PATCH] D27628: COFF: Move a call to toString() out of the hot path.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 9 13:01:46 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL289270: COFF: Move a call to toString() out of the hot path. (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D27628?vs=80940&id=80942#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27628
Files:
lld/trunk/COFF/InputFiles.cpp
Index: lld/trunk/COFF/InputFiles.cpp
===================================================================
--- lld/trunk/COFF/InputFiles.cpp
+++ lld/trunk/COFF/InputFiles.cpp
@@ -171,8 +171,10 @@
int32_t LastSectionNumber = 0;
for (uint32_t I = 0; I < NumSymbols; ++I) {
// Get a COFFSymbolRef object.
- COFFSymbolRef Sym =
- check(COFFObj->getSymbol(I), "broken object file: " + toString(this));
+ ErrorOr<COFFSymbolRef> SymOrErr = COFFObj->getSymbol(I);
+ if (!SymOrErr)
+ fatal(SymOrErr.getError(), "broken object file: " + toString(this));
+ COFFSymbolRef Sym = *SymOrErr;
const void *AuxP = nullptr;
if (Sym.getNumberOfAuxSymbols())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27628.80942.patch
Type: text/x-patch
Size: 683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161209/d6c5f113/attachment.bin>
More information about the llvm-commits
mailing list