r222445 - Bring PostOrderCFGView's insert API up to date with other API changes.
Michael Ilseman
milseman at apple.com
Thu Nov 20 11:32:48 PST 2014
Author: milseman
Date: Thu Nov 20 13:32:48 2014
New Revision: 222445
URL: http://llvm.org/viewvc/llvm-project?rev=222445&view=rev
Log:
Bring PostOrderCFGView's insert API up to date with other API changes.
r222334 updates LLVM data structure's insert API to return a
pair. This change updates PostOrderCFGView accordingly, so that it can
be used interchangably with other sets.
Modified:
cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h
Modified: cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h?rev=222445&r1=222444&r2=222445&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/PostOrderCFGView.h Thu Nov 20 13:32:48 2014
@@ -47,17 +47,17 @@ public:
/// \brief Set the bit associated with a particular CFGBlock.
/// This is the important method for the SetType template parameter.
- bool insert(const CFGBlock *Block) {
+ std::pair<llvm::NoneType, bool> insert(const CFGBlock *Block) {
// Note that insert() is called by po_iterator, which doesn't check to
// make sure that Block is non-null. Moreover, the CFGBlock iterator will
// occasionally hand out null pointers for pruned edges, so we catch those
// here.
if (!Block)
- return false; // if an edge is trivially false.
+ return std::make_pair(None, false); // if an edge is trivially false.
if (VisitedBlockIDs.test(Block->getBlockID()))
- return false;
+ return std::make_pair(None, false);
VisitedBlockIDs.set(Block->getBlockID());
- return true;
+ return std::make_pair(None, true);
}
/// \brief Check if the bit for a CFGBlock has been already set.
More information about the cfe-commits
mailing list