[PATCH] D27372: [PM] Consistently use curly braces rather than std::make_pair in AnalysisResults.find().
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 3 11:59:44 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL288596: [PM] Consistently use curly braces rather than std::make_pair in… (authored by jlebar).
Changed prior to commit:
https://reviews.llvm.org/D27372?vs=80147&id=80187#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27372
Files:
llvm/trunk/include/llvm/IR/PassManager.h
Index: llvm/trunk/include/llvm/IR/PassManager.h
===================================================================
--- llvm/trunk/include/llvm/IR/PassManager.h
+++ llvm/trunk/include/llvm/IR/PassManager.h
@@ -477,7 +477,7 @@
return;
// Clear the map pointing into the results list.
for (auto &IDAndResult : ResultsListI->second)
- AnalysisResults.erase(std::make_pair(IDAndResult.first, &IR));
+ AnalysisResults.erase({IDAndResult.first, &IR});
// And actually destroy and erase the results associated with this IR.
AnalysisResultLists.erase(ResultsListI);
@@ -676,7 +676,7 @@
// P.run may have inserted elements into AnalysisResults and invalidated
// RI.
- RI = AnalysisResults.find(std::make_pair(ID, &IR));
+ RI = AnalysisResults.find({ID, &IR});
assert(RI != AnalysisResults.end() && "we just inserted it!");
RI->second = std::prev(ResultList.end());
@@ -688,14 +688,14 @@
/// \brief Get a cached analysis result or return null.
ResultConceptT *getCachedResultImpl(AnalysisKey *ID, IRUnitT &IR) const {
typename AnalysisResultMapT::const_iterator RI =
- AnalysisResults.find(std::make_pair(ID, &IR));
+ AnalysisResults.find({ID, &IR});
return RI == AnalysisResults.end() ? nullptr : &*RI->second->second;
}
/// \brief Invalidate a function pass result.
void invalidateImpl(AnalysisKey *ID, IRUnitT &IR) {
typename AnalysisResultMapT::iterator RI =
- AnalysisResults.find(std::make_pair(ID, &IR));
+ AnalysisResults.find({ID, &IR});
if (RI == AnalysisResults.end())
return;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27372.80187.patch
Type: text/x-patch
Size: 1634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161203/b51051f1/attachment.bin>
More information about the llvm-commits
mailing list