We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e4938a commit 6a5dd04Copy full SHA for 6a5dd04
llvm/include/llvm/Support/AlignOf.h
@@ -20,7 +20,10 @@ namespace llvm {
20
/// A suitably aligned and sized character array member which can hold elements
21
/// of any type.
22
template <typename T, typename... Ts> struct AlignedCharArrayUnion {
23
- alignas(T) alignas(Ts...) char buffer[std::max({sizeof(T), sizeof(Ts)...})];
+ // Work around "internal compiler error: Segmentation fault" with GCC 7.5,
24
+ // apparently caused by alignas(Ts...).
25
+ static constexpr std::size_t Align = std::max({alignof(T), alignof(Ts)...});
26
+ alignas(Align) char buffer[std::max({sizeof(T), sizeof(Ts)...})];
27
};
28
29
} // end namespace llvm
0 commit comments