Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
fbd2f400
Commit
fbd2f400
authored
16 years ago
by
Ted Kremenek
Browse files
Options
Downloads
Patches
Plain Diff
Add transfer function support for ObjCForCollectionStmt to LiveVariables.
llvm-svn: 59053
parent
2d1937ed
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clang/lib/Analysis/LiveVariables.cpp
+17
-1
17 additions, 1 deletion
clang/lib/Analysis/LiveVariables.cpp
with
17 additions
and
1 deletion
clang/lib/Analysis/LiveVariables.cpp
+
17
−
1
View file @
fbd2f400
...
...
@@ -121,8 +121,9 @@ public:
void
VisitBinaryOperator
(
BinaryOperator
*
B
);
void
VisitAssign
(
BinaryOperator
*
B
);
void
VisitDeclStmt
(
DeclStmt
*
DS
);
void
VisitObjCForCollectionStmt
(
ObjCForCollectionStmt
*
S
);
void
VisitUnaryOperator
(
UnaryOperator
*
U
);
void
Visit
(
Stmt
*
S
);
void
Visit
(
Stmt
*
S
);
void
VisitTerminator
(
CFGBlock
*
B
);
void
SetTopValue
(
LiveVariables
::
ValTy
&
V
)
{
...
...
@@ -175,6 +176,21 @@ void TransferFuncs::VisitBinaryOperator(BinaryOperator* B) {
else
VisitStmt
(
B
);
}
void
TransferFuncs
::
VisitObjCForCollectionStmt
(
ObjCForCollectionStmt
*
S
)
{
Stmt
*
Element
=
S
->
getElement
();
if
(
DeclStmt
*
DS
=
dyn_cast
<
DeclStmt
>
(
Element
))
{
VisitDeclStmt
(
DS
);
return
;
}
// This represents a 'kill' for the variable.
DeclRefExpr
*
DR
=
cast
<
DeclRefExpr
>
(
Element
);
LiveState
(
cast
<
VarDecl
>
(
DR
->
getDecl
()),
AD
)
=
Dead
;
if
(
AD
.
Observer
)
{
AD
.
Observer
->
ObserverKill
(
DR
);
}
}
void
TransferFuncs
::
VisitUnaryOperator
(
UnaryOperator
*
U
)
{
Expr
*
E
=
U
->
getSubExpr
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment