diff options
author | diggerlin <digger.llvm@gmail.com> | 2019-11-19 15:17:32 -0500 |
---|---|---|
committer | diggerlin <digger.llvm@gmail.com> | 2019-11-19 15:17:56 -0500 |
commit | ea13683f3d848df05d836f6d86dc40ba2113bb43 (patch) | |
tree | 6ab9a41a4a6aee053d69bdf8f6a5ab3875cad4ef | |
parent | c444a01df3553d9405cbd4dac3c1074a71e6c2e1 (diff) | |
download | bcm5719-llvm-ea13683f3d848df05d836f6d86dc40ba2113bb43.tar.gz bcm5719-llvm-ea13683f3d848df05d836f6d86dc40ba2113bb43.zip |
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
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index 6cc8deca73b..f98cd69a0d3 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -268,9 +268,11 @@ XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { if (isSectionVirtual(Sec)) return ArrayRef<uint8_t>(); - const uint64_t OffsetToRaw = is64Bit() - ? toSection64(Sec)->FileOffsetToRawData - : toSection32(Sec)->FileOffsetToRawData; + uint64_t OffsetToRaw; + if (is64Bit()) + OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; + else + OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; const uint8_t * ContentStart = base() + OffsetToRaw; uint64_t SectionSize = getSectionSize(Sec); |