[llvm] fdffdf3 - fixed a compiler error as description in
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 09:14:13 PDT 2022
Author: zhijian
Date: 2022-09-19T12:14:02-04:00
New Revision: fdffdf39fcf036f1180473f4ed5a994f163eec1d
URL: https://github.com/llvm/llvm-project/commit/fdffdf39fcf036f1180473f4ed5a994f163eec1d
DIFF: https://github.com/llvm/llvm-project/commit/fdffdf39fcf036f1180473f4ed5a994f163eec1d.diff
LOG: fixed a compiler error as description in
https://lab.llvm.org/buildbot/#/builders/174/builds/13432
XCOFFObjectFile.cpp:805:12: error: reinterpret_cast from 'unsigned long' to 'uintptr_t' (aka 'unsigned int') is not allowed
return reinterpret_cast<uintptr_t>(0ul);
Added:
Modified:
llvm/lib/Object/XCOFFObjectFile.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index 23055b325c48..8ed61a12621f 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 reinterpret_cast<uintptr_t>(0ul);
+ return uintptr_t(0);
};
if (is64Bit())
DRI.p = GetSectionAddr(sections64());
More information about the llvm-commits
mailing list