mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-18 13:16:24 -04:00
Try to appease the Windows build bots.
Several of the conditonal operators commited in llvm-svn: 365524 fail to compile on the windows buildbots. Converting to an if and early return to try to fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365535 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -189,8 +189,12 @@ Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const {
|
||||
}
|
||||
|
||||
uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const {
|
||||
return is64Bit() ? toSection64(Sec)->VirtualAddress
|
||||
: toSection32(Sec)->VirtualAddress;
|
||||
// Avoid ternary due to failure to convert the ubig32_t value to a unit64_t
|
||||
// with MSVC.
|
||||
if (is64Bit())
|
||||
return toSection64(Sec)->VirtualAddress;
|
||||
|
||||
return toSection32(Sec)->VirtualAddress;
|
||||
}
|
||||
|
||||
uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
|
||||
@@ -203,8 +207,12 @@ uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
|
||||
}
|
||||
|
||||
uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const {
|
||||
return is64Bit() ? toSection64(Sec)->SectionSize
|
||||
: toSection32(Sec)->SectionSize;
|
||||
// Avoid ternary due to failure to convert the ubig32_t value to a unit64_t
|
||||
// with MSVC.
|
||||
if (is64Bit())
|
||||
return toSection64(Sec)->SectionSize;
|
||||
|
||||
return toSection32(Sec)->SectionSize;
|
||||
}
|
||||
|
||||
Expected<ArrayRef<uint8_t>>
|
||||
|
||||
Reference in New Issue
Block a user