SmallSet/SmallPtrSet: Refuse huge Small numbers
authorMatthias Braun <matze@braunis.de>
Mon, 1 Feb 2016 22:05:16 +0000 (22:05 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 1 Feb 2016 22:05:16 +0000 (22:05 +0000)
commit3f88eabe9396624efd391ce6fa543e6ce4b5ec5c
treed908e0c28644eed672bc759b6c7cea5bc971eb26
parentd8da15f8a9b6fa0097d9ec88432886ef7b7709fb
SmallSet/SmallPtrSet: Refuse huge Small numbers

These sets do linear searching in small mode; It is not a good idea to
use huge numbers as the small value here, save people from themselves by
adding a static_assert.

Differential Revision: http://reviews.llvm.org/D16706

llvm-svn: 259419
llvm/include/llvm/ADT/SmallPtrSet.h
llvm/include/llvm/ADT/SmallSet.h
llvm/lib/Target/CppBackend/CPPBackend.cpp