Fix MSVC warning "all return expressions must deduce to the same type"

This commit is contained in:
Simon Pilgrim 2022-09-19 16:00:36 +01:00
parent e424418358
commit 0a4c946abc
1 changed files with 1 additions and 1 deletions

View File

@ -798,7 +798,7 @@ Expected<DataRefImpl> XCOFFObjectFile::getSectionByNum(int16_t Num) const {
DataRefImpl
XCOFFObjectFile::getSectionByType(XCOFF::SectionTypeFlags SectType) const {
DataRefImpl DRI;
auto GetSectionAddr = [&](const auto &Sections) {
auto GetSectionAddr = [&](const auto &Sections) -> uintptr_t {
for (const auto &Sec : Sections)
if (Sec.getSectionType() == SectType)
return reinterpret_cast<uintptr_t>(&Sec);