[CFG] NFC: Speculative attempt to fix MSVC internal compiler error on buildbot.

Don't use fancy initialization and member access in a DenseMap.

llvm-svn: 325969
This commit is contained in:
Artem Dergachev 2018-02-23 22:49:25 +00:00
parent 2db2769499
commit 5e2f6ba51e
1 changed files with 6 additions and 3 deletions

View File

@ -476,7 +476,7 @@ class CFGBuilder {
// This is set in the construction trigger and read when the constructor
// itself is being visited.
llvm::DenseMap<CXXConstructExpr *, const ConstructionContext *>
ConstructionContextMap{};
ConstructionContextMap;
bool badCFG = false;
const CFG::BuildOptions &BuildOpts;
@ -497,7 +497,8 @@ public:
explicit CFGBuilder(ASTContext *astContext,
const CFG::BuildOptions &buildOpts)
: Context(astContext), cfg(new CFG()), // crew a new CFG
BuildOpts(buildOpts) {}
ConstructionContextMap(), BuildOpts(buildOpts) {}
// buildCFG - Used by external clients to construct the CFG.
std::unique_ptr<CFG> buildCFG(const Decl *D, Stmt *Statement);
@ -1162,7 +1163,9 @@ void CFGBuilder::findConstructionContexts(
assert(PreviousContext->isStrictlyMoreSpecificThan(ContextSoFar) &&
"Already within a different construction context!");
} else {
ConstructionContextMap[CE] = ContextSoFar;
auto Pair =
ConstructionContextMap.insert(std::make_pair(CE, ContextSoFar));
assert(Pair.second && "Already within a construction context!");
}
} else if (auto *Cleanups = dyn_cast<ExprWithCleanups>(Child)) {
findConstructionContexts(ContextSoFar, Cleanups->getSubExpr());