Index: include/llvm/Support/Compiler.h =================================================================== --- include/llvm/Support/Compiler.h +++ include/llvm/Support/Compiler.h @@ -293,6 +293,15 @@ # define LLVM_ALIGNAS(x) alignas(x) #endif +/// \macro LLVM_PACKED +/// \brief Used to specify a packed structure. +/// +#ifdef _MSC_VER +# define LLVM_PACKED(d) __pragma(pack(push, 1)) d __pragma(pack(pop)) +#else +# define LLVM_PACKED(d) d __attribute__((packed)) +#endif + /// \macro LLVM_PTR_SIZE /// \brief A constant integer equivalent to the value of sizeof(void*). /// Generally used in combination with LLVM_ALIGNAS or when doing computation in