summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorMarcin Swiderski <marcin.sfider@gmail.com>2010-10-29 05:21:47 +0000
committerMarcin Swiderski <marcin.sfider@gmail.com>2010-10-29 05:21:47 +0000
commita7d84a7615ba91ea6473b4b9c941c7bbfb6ba890 (patch)
treea0bf9c1737efb5d41cb5ef021bd8317958ab9abc /clang/lib/Analysis/CFG.cpp
parent93aa84e83b28fd32f370ac99d15ffa49d0f116a9 (diff)
downloadbcm5719-llvm-a7d84a7615ba91ea6473b4b9c941c7bbfb6ba890.tar.gz
bcm5719-llvm-a7d84a7615ba91ea6473b4b9c941c7bbfb6ba890.zip
Added CFGTerminator class, that holds information about CFGBlock terminator statement.
llvm-svn: 117642
Diffstat (limited to 'clang/lib/Analysis/CFG.cpp')
-rw-r--r--clang/lib/Analysis/CFG.cpp10
1 files changed, 5 insertions, 5 deletions
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<SwitchStmt>(From->getTerminator())) {
+ dyn_cast_or_null<SwitchStmt>(From->getTerminator().getStmt())) {
if (S->isAllEnumCasesCovered()) {
const Stmt *L = To->getLabel();
if (!L || !isa<CaseStmt>(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<Stmt*>(B.getTerminator()));
+ TPrinter.Visit(const_cast<Stmt*>(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<Stmt*>(getTerminator()));
+ TPrinter.Visit(const_cast<Stmt*>(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;
OpenPOWER on IntegriCloud