diff options
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r-- | lib/Analysis/CFG.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 706d69010b..e54fae33fe 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -457,8 +457,11 @@ private: CachedBoolEvals.insert(std::make_pair(S, TryResult())); if (!Inserted) return I->second; // already in map; - - return (I->second = evaluateAsBooleanConditionNoCache(S)); + + // Retrieve result at first, or the map might be updated. + TryResult Result = evaluateAsBooleanConditionNoCache(S); + CachedBoolEvals[S] = Result; // update or insert + return Result; } } |