[cfe-commits] r50458 - /cfe/trunk/lib/Analysis/ValueState.cpp
Ted Kremenek
kremenek at apple.com
Tue Apr 29 16:58:03 PDT 2008
Author: kremenek
Date: Tue Apr 29 18:58:03 2008
New Revision: 50458
URL: http://llvm.org/viewvc/llvm-project?rev=50458&view=rev
Log:
Simplify RemoveDeadBindings.
Modified:
cfe/trunk/lib/Analysis/ValueState.cpp
Modified: cfe/trunk/lib/Analysis/ValueState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ValueState.cpp?rev=50458&r1=50457&r2=50458&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/ValueState.cpp (original)
+++ cfe/trunk/lib/Analysis/ValueState.cpp Tue Apr 29 18:58:03 2008
@@ -106,26 +106,18 @@
Marked.insert(V);
- if (V->getType()->isPointerType()) {
+ RVal X = GetRVal(St, lval::DeclVal(cast<VarDecl>(V)));
- RVal X = GetRVal(St, lval::DeclVal(cast<VarDecl>(V)));
-
- if (X.isUnknownOrUndef())
- continue;
-
- LVal LV = cast<LVal>(X);
-
- for (RVal::symbol_iterator SI = LV.symbol_begin(), SE = LV.symbol_end();
- SI != SE; ++SI) {
- MarkedSymbols.insert(*SI);
- }
+ for (RVal::symbol_iterator SI = X.symbol_begin(), SE = X.symbol_end();
+ SI != SE; ++SI) {
+ MarkedSymbols.insert(*SI);
+ }
- if (!isa<lval::DeclVal>(LV))
- continue;
+ if (!isa<lval::DeclVal>(X))
+ continue;
- const lval::DeclVal& LVD = cast<lval::DeclVal>(LV);
- WList.push_back(LVD.getDecl());
- }
+ const lval::DeclVal& LVD = cast<lval::DeclVal>(X);
+ WList.push_back(LVD.getDecl());
}
// Remove dead variable bindings.
More information about the cfe-commits
mailing list