forked from OSchip/llvm-project
Fix MSVC warning "all return expressions must deduce to the same type"
This commit is contained in:
parent
e424418358
commit
0a4c946abc
|
@ -798,7 +798,7 @@ Expected<DataRefImpl> XCOFFObjectFile::getSectionByNum(int16_t Num) const {
|
||||||
DataRefImpl
|
DataRefImpl
|
||||||
XCOFFObjectFile::getSectionByType(XCOFF::SectionTypeFlags SectType) const {
|
XCOFFObjectFile::getSectionByType(XCOFF::SectionTypeFlags SectType) const {
|
||||||
DataRefImpl DRI;
|
DataRefImpl DRI;
|
||||||
auto GetSectionAddr = [&](const auto &Sections) {
|
auto GetSectionAddr = [&](const auto &Sections) -> uintptr_t {
|
||||||
for (const auto &Sec : Sections)
|
for (const auto &Sec : Sections)
|
||||||
if (Sec.getSectionType() == SectType)
|
if (Sec.getSectionType() == SectType)
|
||||||
return reinterpret_cast<uintptr_t>(&Sec);
|
return reinterpret_cast<uintptr_t>(&Sec);
|
||||||
|
|
Loading…
Reference in New Issue