From 3f88eabe9396624efd391ce6fa543e6ce4b5ec5c Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 1 Feb 2016 22:05:16 +0000 Subject: 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/lib/Target/CppBackend/CPPBackend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Target/CppBackend/CPPBackend.cpp') 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 gvs; - SmallPtrSet consts; + SmallPtrSet gvs; + SmallPtrSet consts; for (Function::const_iterator BB = F->begin(), BE = F->end(); BB != BE; ++BB){ for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); -- cgit v1.2.3