[cfe-commits] r49707 - /cfe/trunk/lib/Analysis/LiveVariables.cpp
Ted Kremenek
kremenek at apple.com
Mon Apr 14 21:08:55 PDT 2008
Author: kremenek
Date: Mon Apr 14 23:08:54 2008
New Revision: 49707
URL: http://llvm.org/viewvc/llvm-project?rev=49707&view=rev
Log:
++/-- makes a variable live since it is used; thus the liveness state is
"Alive" as opposed to staying the same.
Modified:
cfe/trunk/lib/Analysis/LiveVariables.cpp
Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/LiveVariables.cpp?rev=49707&r1=49706&r2=49707&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/LiveVariables.cpp (original)
+++ cfe/trunk/lib/Analysis/LiveVariables.cpp Mon Apr 14 23:08:54 2008
@@ -114,10 +114,10 @@
// until we either find a DeclRefExpr or some non-DeclRefExpr
// expression.
if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(E->IgnoreParens()))
- if (isa<VarDecl>(DR->getDecl())) {
- // Treat the --/++ operator as a kill. Note that the variable
- // is still live, just its value has been changed.
+ if (VarDecl* VD = dyn_cast<VarDecl>(DR->getDecl())) {
+ // Treat the --/++ operator as a kill.
if (AD.Observer) { AD.Observer->ObserverKill(DR); }
+ LiveState(VD, AD) = Alive;
return VisitDeclRefExpr(DR);
}
More information about the cfe-commits
mailing list