summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/configuration.py
diff options
context:
space:
mode:
authorMichael Liao <michael.hliao@gmail.com>2019-07-30 16:11:48 +0000
committerMichael Liao <michael.hliao@gmail.com>2019-07-30 16:11:48 +0000
commit0d6615cc1911baaa53fb0141a288b2cd7c072a13 (patch)
tree19ebaa652633bc028fab72ef8c96dc6684f87652 /lldb/packages/Python/lldbsuite/test/configuration.py
parent5ed3d146f87e3103ea5bbdb27bca8d6b1b1f714a (diff)
downloadbcm5719-llvm-0d6615cc1911baaa53fb0141a288b2cd7c072a13.tar.gz
bcm5719-llvm-0d6615cc1911baaa53fb0141a288b2cd7c072a13.zip
[Support] Workaround a GCC 4.8 bug on constant expression evaluation.
Summary: - The following stripped code trigger a gcc-4.8 bug. To work that around, move the alignment evaluation into template parameter. ``` // https://godbolt.org/z/58p5_X // enum { aligned = 0, unaligned = 1 }; template <typename T, int alignment> struct PickAlignment { enum { value = alignment == 0 ? alignof(T) : alignment }; }; template <typename ValueType, std::size_t Alignment> struct packed { private: struct { alignas( PickAlignment<ValueType, Alignment>::value) char buffer[sizeof(int)]; } Value; }; using ule16_t = packed<uint16_t, unaligned>; ule16_t x; ``` - Also, replace `alignas` with `LLVMALIGN_AS` to improve the compiler compatibility. Reviewers: jfb Subscribers: dexonsmith, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65452 llvm-svn: 367329
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/configuration.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud