[PATCH] D64417: [Support] Remove MSVC specific AlignedCharArray implementation

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 11:40:49 PDT 2019


rnk added a comment.

I think the first version of MSVC 2017 doesn't allow you to pass aligned parameters when targeting x86, which has always been the problem child architecture:
https://gcc.godbolt.org/z/n_l_g5
Godbolt doesn't seem to have MSVC 2017 versions 19.11-19.13 to allow us to test.

LLVM claims it's minimum supported version is 19.11:
https://github.com/llvm/llvm-project/blob/456fc4fa6dc573c717f8db0d44a078f28060826e/llvm/cmake/modules/CheckCompilerVersion.cmake#L16

I think we need to check if 19.11 accepts this new code before we land this change, or we need to raise it the minimum to 19.14.

> This patch raises the question of whether we want to use llvm::AlignedCharArray directly in the codebase or whether some/all cases should be replaced with a type that uses alignas() directly?

I think you're right, a lot of code can be simplified to use LLVM_ALIGNAS. I think we still need the LLVM_ALIGNAS portability macro until we raise our minimum GCC version, but it works more or less just as well as alignas.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64417/new/

https://reviews.llvm.org/D64417





More information about the llvm-commits mailing list