OSDN Git Service

[ADT] Try to work around a crash in MSVC.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 3 Jul 2018 05:46:20 +0000 (05:46 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 3 Jul 2018 05:46:20 +0000 (05:46 +0000)
commitaabbcb39787502687469688a189fe0e81c055496
tree568a033acd3f05a6893723763a67a45d15930030
parent2ef7a1ca8c0c174b83a6ffb04ac45a48b815767b
[ADT] Try to work around a crash in MSVC.

Putting `sizeof(T) <= 16` into the parameter of a `std::conditional`
causes every version of MSVC I've tried to crash:

  https://godbolt.org/g/eqVULL

Really frustrating, but an extra layer of indirection through an
instantiated type gives a working way to access this computed constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336170 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/FunctionExtras.h