Shrink SmallPtrSet. It gets swapped a lot which copies the whole small part.
Testing shows that it's empty in >99% of the cases and I couldn't find a case
where it contained more than 2 elements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175967 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 669cf9e..12a787e 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -256,7 +256,7 @@
/// element type here is ExprWithCleanups::Object.
SmallVector<BlockDecl*, 8> ExprCleanupObjects;
- llvm::SmallPtrSet<Expr*, 8> MaybeODRUseExprs;
+ llvm::SmallPtrSet<Expr*, 2> MaybeODRUseExprs;
/// \brief Stack containing information about each of the nested
/// function, block, and method scopes that are currently active.
@@ -629,7 +629,7 @@
/// this expression evaluation context.
unsigned NumCleanupObjects;
- llvm::SmallPtrSet<Expr*, 8> SavedMaybeODRUseExprs;
+ llvm::SmallPtrSet<Expr*, 2> SavedMaybeODRUseExprs;
/// \brief The lambdas that are present within this context, if it
/// is indeed an unevaluated context.