From: Benjamin Kramer Date: Sat, 13 Feb 2016 15:49:17 +0000 (+0000) Subject: Don't copy a DenseMap just to do lookup in it. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4be4f68d12ab7fc81ec609cac3ccb904b153c824;p=clang Don't copy a DenseMap just to do lookup in it. Also remove the now unused isPodLike specialization. DenseMap only uses it for copies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260822 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 836073a680..e304965562 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -3531,11 +3531,6 @@ template <> struct DenseMapInfo { return LHS == RHS; } }; - -// It's OK to treat CatchHandlerType as a POD type. -template <> struct isPodLike { - static const bool value = true; -}; } namespace { @@ -3560,7 +3555,7 @@ public: bool operator()(const CXXBaseSpecifier *S, CXXBasePath &) { if (S->getAccessSpecifier() == AccessSpecifier::AS_public) { CatchHandlerType Check(S->getType(), CheckAgainstPointer); - auto M = TypesToCheck; + const auto &M = TypesToCheck; auto I = M.find(Check); if (I != M.end()) { FoundHandler = I->second;