This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Disable GCC 9's -Wpessimizing-move
ClosedPublic

Authored by mstorsjo on Mar 19 2021, 4:51 AM.

Details

Summary

Similar to the existing code for disabling GCC's -Wredudant-move,
also check for the -Wpessimizing-move option and disable it if
possible.

This silences another bunch of noisy warnings when building LLVM
with GCC 9.

As noted for -Wredundant-move, the cases can't be fixed while
retaining support for older compilers.

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 19 2021, 4:51 AM
mstorsjo requested review of this revision.Mar 19 2021, 4:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2021, 4:51 AM
xbolva00 added inline comments.
llvm/cmake/modules/HandleLLVMOptions.cmake
711

Maybe we can drop this? LLVM supports clang 3.6 or newer.

labath accepted this revision.Mar 22 2021, 2:36 AM

looks good to me.

llvm/cmake/modules/HandleLLVMOptions.cmake
692–698

This comment could use some rephrasing/generalization.

711

Possibly. But that definitely sounds like a separate patch.

This revision is now accepted and ready to land.Mar 22 2021, 2:36 AM
This revision was automatically updated to reflect the committed changes.