From d8bddcce4436881b21a3cc01a06c44bd87035ed1 Mon Sep 17 00:00:00 2001 From: Michael Ilseman Date: Thu, 20 Nov 2014 19:32:48 +0000 Subject: [PATCH] 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. llvm-svn: 222445 --- clang/include/clang/Analysis/Analyses/PostOrderCFGView.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h b/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h index 68e42f2..a1c6504 100644 --- a/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h +++ b/clang/include/clang/Analysis/Analyses/PostOrderCFGView.h @@ -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 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. -- 2.7.4