[llvm] a3aab98 - fixed a compiler error as description in
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 08:58:02 PDT 2022
Author: zhijian
Date: 2022-09-19T11:57:45-04:00
New Revision: a3aab98ef49990178714be894d8d3e6249e4dc1b
URL: https://github.com/llvm/llvm-project/commit/a3aab98ef49990178714be894d8d3e6249e4dc1b
DIFF: https://github.com/llvm/llvm-project/commit/a3aab98ef49990178714be894d8d3e6249e4dc1b.diff
LOG: fixed a compiler error as description in
https://lab.llvm.org/buildbot/#/builders/216/builds/9977
XCOFFOtFile.cpp: error C3487: 'unsigned long': all return expressions must deduce to the same type: previously it was 'uintptr_t'
Added:
Modified:
llvm/lib/Object/XCOFFObjectFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index 853201283bf6..23055b325c48 100644
--- a/llvm/lib/Object/XCOFFObjectFile.cpp
+++ b/llvm/lib/Object/XCOFFObjectFile.cpp
@@ -802,7 +802,7 @@ XCOFFObjectFile::getSectionByType(XCOFF::SectionTypeFlags SectType) const {
for (const auto &Sec : Sections)
if (Sec.getSectionType() == SectType)
return reinterpret_cast<uintptr_t>(&Sec);
- return 0ul;
+ return reinterpret_cast<uintptr_t>(0ul);
};
if (is64Bit())
DRI.p = GetSectionAddr(sections64());
More information about the llvm-commits
mailing list