From: Reid Kleckner Date: Thu, 21 May 2015 00:12:53 +0000 (+0000) Subject: Work around overloading bug in MSVC 2015 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4a26ed58e615a86721f38640864324ed4555bd1;p=platform%2Fupstream%2Fllvm.git Work around overloading bug in MSVC 2015 MSVC 2015 appears to be unable to find the correct operator== here. I haven't yet filed a bug with Microsoft as I've been unable to create a reduced test case. llvm-svn: 237862 --- diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index 8c9f57d..2101a55 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/lib/AST/RecordLayoutBuilder.cpp @@ -2976,11 +2976,11 @@ void ASTContext::setNonKeyFunction(const CXXMethodDecl *Method) { // Look up the cache entry. Since we're working with the first // declaration, its parent must be the class definition, which is // the correct key for the KeyFunctions hash. - llvm::DenseMap::iterator - I = KeyFunctions.find(Method->getParent()); + const auto &Map = KeyFunctions; + auto I = Map.find(Method->getParent()); // If it's not cached, there's nothing to do. - if (I == KeyFunctions.end()) return; + if (I == Map.end()) return; // If it is cached, check whether it's the target method, and if so, // remove it from the cache. Note, the call to 'get' might invalidate