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