From 0a4c946abcfaae3601c49a55e29944287f867b7f Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 19 Sep 2022 16:00:36 +0100 Subject: [PATCH] Fix MSVC warning "all return expressions must deduce to the same type" --- llvm/lib/Object/XCOFFObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index b1f44f1db667..853201283bf6 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -798,7 +798,7 @@ Expected 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(&Sec);