llvm.org GIT mirror llvm / 533342f
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 Sean Fertile a month ago
1 changed file(s) with 12 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
188188 }
189189
190190 uint64_t XCOFFObjectFile::getSectionAddress(DataRefImpl Sec) const {
191 return is64Bit() ? toSection64(Sec)->VirtualAddress
192 : toSection32(Sec)->VirtualAddress;
191 // Avoid ternary due to failure to convert the ubig32_t value to a unit64_t
192 // with MSVC.
193 if (is64Bit())
194 return toSection64(Sec)->VirtualAddress;
195
196 return toSection32(Sec)->VirtualAddress;
193197 }
194198
195199 uint64_t XCOFFObjectFile::getSectionIndex(DataRefImpl Sec) const {
202206 }
203207
204208 uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const {
205 return is64Bit() ? toSection64(Sec)->SectionSize
206 : toSection32(Sec)->SectionSize;
209 // Avoid ternary due to failure to convert the ubig32_t value to a unit64_t
210 // with MSVC.
211 if (is64Bit())
212 return toSection64(Sec)->SectionSize;
213
214 return toSection32(Sec)->SectionSize;
207215 }
208216
209217 Expected>