Skip to content

Commit ea13683

Browse files
author
diggerlin
committed
The patch is the compiler error specific on the compile error on CMVC
SUMMARY: CMVC has a compiler error on the const uint64_t OffsetToRaw = is64Bit() ? toSection64(Sec)->FileOffsetToRawData : toSection32(Sec)->FileOffsetToRawData; while gcc compiler do not have the problem. I have to change the code to uint64_t OffsetToRaw; if (is64Bit()) OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; else OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; Reviewers: Sean Fertile Subscribers: rupprecht, seiyai,hiraditya Differential Revision: https://reviews.llvm.org/D70255
1 parent c444a01 commit ea13683

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/lib/Object/XCOFFObjectFile.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,11 @@ XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const {
268268
if (isSectionVirtual(Sec))
269269
return ArrayRef<uint8_t>();
270270

271-
const uint64_t OffsetToRaw = is64Bit()
272-
? toSection64(Sec)->FileOffsetToRawData
273-
: toSection32(Sec)->FileOffsetToRawData;
271+
uint64_t OffsetToRaw;
272+
if (is64Bit())
273+
OffsetToRaw = toSection64(Sec)->FileOffsetToRawData;
274+
else
275+
OffsetToRaw = toSection32(Sec)->FileOffsetToRawData;
274276

275277
const uint8_t * ContentStart = base() + OffsetToRaw;
276278
uint64_t SectionSize = getSectionSize(Sec);

0 commit comments

Comments
 (0)