OSDN Git Service

Fix MSVC build of AlignedCharArrayUnion
authorReid Kleckner <rnk@google.com>
Tue, 10 Jan 2017 00:26:56 +0000 (00:26 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 10 Jan 2017 00:26:56 +0000 (00:26 +0000)
commit178be5db99d47508fb39c39aad2eae1080ba4b7a
tree9c7497b09da1026247b60ce86b4ebb604ee3cb61
parent48a2a277e60e9a1a2b563f37cc7e0c5b9680872f
Fix MSVC build of AlignedCharArrayUnion

Use constexpr recursion for alignof like we do for sizeof. Seems to work
with Clang and MSVC. Also, don't recurse twice to avoid slowdowns in
compilers that don't memoize constexpr results (Clang).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291514 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/AlignOf.h