[llvm] ea13683 - The patch is the compiler error specific on the compile error on CMVC
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 12:29:14 PST 2019
What's CMVC?
Is the review link correct?
Is this gcc(and clang, naturally) problem, or "CMVC"'s?
Is it reported upstream?
Roman
On Tue, Nov 19, 2019 at 11:20 PM via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
>
> Author: diggerlin
> Date: 2019-11-19T15:17:56-05:00
> New Revision: ea13683f3d848df05d836f6d86dc40ba2113bb43
>
> URL: https://github.com/llvm/llvm-project/commit/ea13683f3d848df05d836f6d86dc40ba2113bb43
> DIFF: https://github.com/llvm/llvm-project/commit/ea13683f3d848df05d836f6d86dc40ba2113bb43.diff
>
> LOG: 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
>
> Added:
>
>
> Modified:
> llvm/lib/Object/XCOFFObjectFile.cpp
>
> Removed:
>
>
>
> ################################################################################
> diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
> index 6cc8deca73b6..f98cd69a0d37 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);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list