[AIX][Clang] Fix XL product name in AIX XL compatibility warning

Correct the XLC/C++ version in the warning message to use the information from
XL's -qversion output.

Reviewed By: rzurob

Differential Revision: https://reviews.llvm.org/D112847
This commit is contained in:
Zarko Todorovski 2021-11-05 12:37:42 -04:00
parent 2f0ee17017
commit 1b7528554f
2 changed files with 4 additions and 3 deletions

View File

@ -3277,7 +3277,8 @@ def warn_assume_aligned_too_great
InGroup<DiagGroup<"builtin-assume-aligned-alignment">>;
def warn_not_xl_compatible
: Warning<"requesting an alignment of 16 bytes or greater for struct"
" members is not binary compatible with AIX XL 16.1 and older">,
" members is not binary compatible with IBM XL C/C++ for AIX"
" 16.1.0 and older">,
InGroup<AIXCompat>;
def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning<
"%q0 redeclared without %1 attribute: previous %1 ignored">,

View File

@ -10,11 +10,11 @@ struct S {
};
struct T {
int a[4] __attribute__((aligned(16))); // expected-warning {{requesting an alignment of 16 bytes or greater for struct members is not binary compatible with AIX XL 16.1 and older}}
int a[4] __attribute__((aligned(16))); // expected-warning {{requesting an alignment of 16 bytes or greater for struct members is not binary compatible with IBM XL C/C++ for AIX 16.1.0 and older}}
};
struct U {
int a[2] __attribute__((aligned(32))); // expected-warning {{requesting an alignment of 16 bytes or greater for struct members is not binary compatible with AIX XL 16.1 and older}}
int a[2] __attribute__((aligned(32))); // expected-warning {{requesting an alignment of 16 bytes or greater for struct members is not binary compatible with IBM XL C/C++ for AIX 16.1.0 and older}}
};
int a[8] __attribute__((aligned(8))); // no-warning