summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-02-01 22:05:16 +0000
committerMatthias Braun <matze@braunis.de>2016-02-01 22:05:16 +0000
commit3f88eabe9396624efd391ce6fa543e6ce4b5ec5c (patch)
treed908e0c28644eed672bc759b6c7cea5bc971eb26 /llvm/lib/Target/CppBackend/CPPBackend.cpp
parentd8da15f8a9b6fa0097d9ec88432886ef7b7709fb (diff)
downloadbcm5719-llvm-3f88eabe9396624efd391ce6fa543e6ce4b5ec5c.tar.gz
bcm5719-llvm-3f88eabe9396624efd391ce6fa543e6ce4b5ec5c.zip
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
Diffstat (limited to 'llvm/lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r--llvm/lib/Target/CppBackend/CPPBackend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp
index dd5590307ee..cfa1f2ce619 100644
--- a/llvm/lib/Target/CppBackend/CPPBackend.cpp
+++ b/llvm/lib/Target/CppBackend/CPPBackend.cpp
@@ -1651,8 +1651,8 @@ void CppWriter::printFunctionUses(const Function* F) {
// Print type definitions for every type referenced by an instruction and
// make a note of any global values or constants that are referenced
- SmallPtrSet<GlobalValue*,64> gvs;
- SmallPtrSet<Constant*,64> consts;
+ SmallPtrSet<GlobalValue*,32> gvs;
+ SmallPtrSet<Constant*,32> consts;
for (Function::const_iterator BB = F->begin(), BE = F->end();
BB != BE; ++BB){
for (BasicBlock::const_iterator I = BB->begin(), E = BB->end();
OpenPOWER on IntegriCloud