/// This class contains the information for a trailing operand storage.
struct TrailingOperandStorage final
: public llvm::TrailingObjects<TrailingOperandStorage, OpOperand> {
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)
+ TrailingOperandStorage() : numOperands(0), capacity(0), reserved(0) {}
+#else
TrailingOperandStorage() : reserved(0), capacity(0), numOperands(0) {}
+#endif
~TrailingOperandStorage() {
for (auto &operand : getOperands())
operand.~OpOperand();
return {getTrailingObjects<OpOperand>(), numOperands};
}
+#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && (BYTE_ORDER == BIG_ENDIAN)
+ /// The number of operands within the storage.
+ unsigned numOperands;
+ /// The total capacity number of operands that the storage can hold.
+ unsigned capacity : 31;
+ /// We reserve a range of bits for use by the operand storage.
+ unsigned reserved : 1;
+#else
/// We reserve a range of bits for use by the operand storage.
unsigned reserved : 1;
/// The total capacity number of operands that the storage can hold.
unsigned capacity : 31;
/// The number of operands within the storage.
unsigned numOperands;
+#endif
};
/// This class handles the management of operation operands. Operands are