summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
index 980eec74051..8898746a78b 100644
--- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
@@ -477,8 +477,7 @@ error_code FileCOFF::createDefinedSymbols(const SymbolVectorT &symbols,
continue;
const coff_section *sec;
- if (error_code ec =
- _obj->getSection(static_cast<uint16_t>(sym->SectionNumber), sec))
+ if (error_code ec = _obj->getSection(sym->SectionNumber, sec))
return ec;
assert(sec && "SectionIndex > 0, Sec must be non-null!");
@@ -527,8 +526,7 @@ error_code FileCOFF::cacheSectionAttributes() {
continue;
const coff_section *sec;
- if (error_code ec =
- _obj->getSection(static_cast<uint16_t>(sym->SectionNumber), sec))
+ if (error_code ec = _obj->getSection(sym->SectionNumber, sec))
return ec;
if (_merge.count(sec))
OpenPOWER on IntegriCloud