This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Suppress -Waix-compat warning with SmallVector class
ClosedPublic

Authored by Jake-Egan on Aug 23 2021, 1:08 PM.

Details

Summary

When building LLVM with Open XL and -Werror is specified, the -Waix-compat warning becomes an error. This patch updates the SmallVector class to suppress the -Waix-compat warning/error on AIX.

Diff Detail

Event Timeline

Jake-Egan created this revision.Aug 23 2021, 1:08 PM
Jake-Egan requested review of this revision.Aug 23 2021, 1:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2021, 1:08 PM
Jake-Egan abandoned this revision.Aug 23 2021, 1:18 PM
Jake-Egan reclaimed this revision.Aug 24 2021, 7:28 AM
Jake-Egan updated this revision to Diff 368340.Aug 24 2021, 7:30 AM

Add condition for _AIX.

Jake-Egan retitled this revision from Avoid -Waix-compat warning with SmallVector class to [AIX] Avoid -Waix-compat warning with SmallVector class.Aug 24 2021, 7:34 AM
Jake-Egan edited the summary of this revision. (Show Details)
daltenty requested changes to this revision.EditedAug 25 2021, 2:03 PM

Not sure the compilers in question accept this attribute form.

Since this structure is only used for checking the following static asserts, so binary compat probably isn't a real concern. So maybe it's better to suppress the warning is better this case.

This revision now requires changes to proceed.Aug 25 2021, 2:03 PM

Suppress -Waix-compat warning

Jake-Egan retitled this revision from [AIX] Avoid -Waix-compat warning with SmallVector class to [AIX] Suppress -Waix-compat warning with SmallVector class.Aug 26 2021, 11:12 AM
Jake-Egan edited the summary of this revision. (Show Details)
daltenty accepted this revision.Aug 27 2021, 8:16 AM

LGTM, with minor nit

llvm/lib/Support/SmallVector.cpp
22

nit: maybe a comment would be warranted, since this what the intention of this is won't be very obvious to anyone who doesn't work on AIX

This revision is now accepted and ready to land.Aug 27 2021, 8:16 AM
Jake-Egan updated this revision to Diff 369119.Aug 27 2021, 9:07 AM

Added a comment.

Jake-Egan marked an inline comment as done.Aug 27 2021, 9:08 AM