From a7d84a7615ba91ea6473b4b9c941c7bbfb6ba890 Mon Sep 17 00:00:00 2001 From: Marcin Swiderski Date: Fri, 29 Oct 2010 05:21:47 +0000 Subject: Added CFGTerminator class, that holds information about CFGBlock terminator statement. llvm-svn: 117642 --- clang/lib/Analysis/CFG.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/lib/Analysis/CFG.cpp') diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index 3653500f925..527d0eb870e 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -2455,7 +2455,7 @@ bool CFGBlock::FilterEdge(const CFGBlock::FilterOptions &F, // If the 'To' has no label or is labeled but the label isn't a // CaseStmt then filter this edge. if (const SwitchStmt *S = - dyn_cast_or_null(From->getTerminator())) { + dyn_cast_or_null(From->getTerminator().getStmt())) { if (S->isAllEnumCasesCovered()) { const Stmt *L = To->getLabel(); if (!L || !isa(L)) @@ -2834,7 +2834,7 @@ static void print_block(llvm::raw_ostream& OS, const CFG* cfg, CFGBlockTerminatorPrint TPrinter(OS, Helper, PrintingPolicy(Helper->getLangOpts())); - TPrinter.Visit(const_cast(B.getTerminator())); + TPrinter.Visit(const_cast(B.getTerminator().getStmt())); OS << '\n'; } @@ -2916,11 +2916,11 @@ void CFGBlock::print(llvm::raw_ostream& OS, const CFG* cfg, void CFGBlock::printTerminator(llvm::raw_ostream &OS, const LangOptions &LO) const { CFGBlockTerminatorPrint TPrinter(OS, NULL, PrintingPolicy(LO)); - TPrinter.Visit(const_cast(getTerminator())); + TPrinter.Visit(const_cast(getTerminator().getStmt())); } Stmt* CFGBlock::getTerminatorCondition() { - + Stmt *Terminator = this->Terminator; if (!Terminator) return NULL; @@ -2974,7 +2974,7 @@ Stmt* CFGBlock::getTerminatorCondition() { } bool CFGBlock::hasBinaryBranchTerminator() const { - + const Stmt *Terminator = this->Terminator; if (!Terminator) return false; -- cgit v1.2.3