[PowerPC][AIX} FIx AIX bootstrap build.
authorSean Fertile <sd.fertile@gmail.com>
Tue, 1 Jun 2021 17:39:02 +0000 (13:39 -0400)
committerSean Fertile <sd.fertile@gmail.com>
Wed, 2 Jun 2021 13:31:11 +0000 (09:31 -0400)
A recent patch:
https://reviews.llvm.org/rGe0921655b1ff8d4ba7c14be59252fe05b705920e
changed clangs AIX bitfield handling to use 4-byte bitfield containers,
matching XLs behavior. This change triggers static assert failures when
bootstrapping. Change the macro we check to enable bitfield packing on
AIX to `__clang__` which is defined by both xlclang and clang.

Differential Revision: https://reviews.llvm.org/D103474

llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/include/llvm/IR/BasicBlock.h

index 43f3527..dc58dd3 100644 (file)
@@ -462,7 +462,7 @@ protected:
   // SubclassData.  These are designed to fit within a uint16_t so they pack
   // with NodeType.
 
-#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+#if defined(_AIX) && (!defined(__GNUC__) || defined(__clang__))
 // Except for GCC; by default, AIX compilers store bit-fields in 4-byte words
 // and give the `pack` pragma push semantics.
 #define BEGIN_TWO_BYTE_PACK() _Pragma("pack(2)")
index db831bd..0af4ec4 100644 (file)
@@ -513,7 +513,7 @@ public:
   void validateInstrOrdering() const;
 
 private:
-#if defined(_AIX) && (!defined(__GNUC__) || defined(__ibmxl__))
+#if defined(_AIX) && (!defined(__GNUC__) || defined(__clang__))
 // Except for GCC; by default, AIX compilers store bit-fields in 4-byte words
 // and give the `pack` pragma push semantics.
 #define BEGIN_TWO_BYTE_PACK() _Pragma("pack(2)")