[VPlan] Use pragma pack(1) for VPIRFlags on AIX. (#184687)
Some compilers (e.g. on AIX) do not pack by default. Use LLVM_PACKED to ensure the VPIRFlags struct is packed as expected on all platforms. This matches what we already do in other places for AIX, e.g. in llvm/include/llvm/CodeGen/SelectionDAGNodes.h (added in 844a02e509a4cc03f76ef5dd1c358c57ee164b71), although it uses the more general LLVM_PACKED unconditionally PR: https://github.com/llvm/llvm-project/pull/184687
This commit is contained in:
parent
520319e3e0
commit
5e88b806e8
@ -668,6 +668,7 @@ public:
|
||||
};
|
||||
|
||||
/// Class to record and manage LLVM IR flags.
|
||||
LLVM_PACKED_START
|
||||
class VPIRFlags {
|
||||
enum class OperationType : unsigned char {
|
||||
Cmp,
|
||||
@ -1070,6 +1071,7 @@ public:
|
||||
void printFlags(raw_ostream &O) const;
|
||||
#endif
|
||||
};
|
||||
LLVM_PACKED_END
|
||||
|
||||
static_assert(sizeof(VPIRFlags) <= 3, "VPIRFlags should not grow");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user