[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)
commit83e5f81d264fa927e7f0388535b31f707b1d9bea
treeaffc53907e1da1e2622b45b5d28dc71f13823d01
parent6121699b110e12df972d11e05e705794cc0a58e0
[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.

llvm-svn: 336170
llvm/include/llvm/ADT/FunctionExtras.h