Don't copy a DenseMap just to do lookup in it.

Also remove the now unused isPodLike specialization. DenseMap only uses
it for copies.

llvm-svn: 260822
This commit is contained in:
Benjamin Kramer 2016-02-13 15:49:17 +00:00
parent fec328083a
commit 536ffdf51d
1 changed files with 1 additions and 6 deletions

View File

@ -3531,11 +3531,6 @@ template <> struct DenseMapInfo<CatchHandlerType> {
return LHS == RHS;
}
};
// It's OK to treat CatchHandlerType as a POD type.
template <> struct isPodLike<CatchHandlerType> {
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;