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
870600d6
Commit
870600d6
authored
17 years ago
by
Ted Kremenek
Browse files
Options
Downloads
Patches
Plain Diff
Only serialize top-level decls that appear at the head of a decl chain.
llvm-svn: 44438
parent
ffa55112
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clang/Driver/SerializationTest.cpp
+17
-12
17 additions, 12 deletions
clang/Driver/SerializationTest.cpp
with
17 additions
and
12 deletions
clang/Driver/SerializationTest.cpp
+
17
−
12
View file @
870600d6
...
@@ -128,18 +128,23 @@ void SerializationTest::Serialize(llvm::sys::Path& Filename,
...
@@ -128,18 +128,23 @@ void SerializationTest::Serialize(llvm::sys::Path& Filename,
for
(
std
::
list
<
Decl
*>::
iterator
I
=
Decls
.
begin
(),
E
=
Decls
.
end
();
I
!=
E
;
++
I
)
{
for
(
std
::
list
<
Decl
*>::
iterator
I
=
Decls
.
begin
(),
E
=
Decls
.
end
();
I
!=
E
;
++
I
)
{
llvm
::
cerr
<<
"Serializing: Decl.
\n
"
;
llvm
::
cerr
<<
"Serializing: Decl.
\n
"
;
Printer
->
HandleTopLevelDecl
(
*
I
);
// Only serialize the head of a decl chain. The ASTConsumer interfaces
FilePrinter
->
HandleTopLevelDecl
(
*
I
);
// provides us with each top-level decl, including those nested in
// a decl chain, so we may be passed decls that are already serialized.
if
(
FunctionDecl
*
FD
=
dyn_cast
<
FunctionDecl
>
(
*
I
))
if
(
!
Sezr
.
isRegistered
(
*
I
))
{
if
(
FD
->
getBody
())
{
Printer
->
HandleTopLevelDecl
(
*
I
);
// Construct and print a CFG.
FilePrinter
->
HandleTopLevelDecl
(
*
I
);
Janitor
<
CFG
>
cfg
(
CFG
::
buildCFG
(
FD
->
getBody
()));
cfg
->
print
(
DeclPP
);
if
(
FunctionDecl
*
FD
=
dyn_cast
<
FunctionDecl
>
(
*
I
))
}
if
(
FD
->
getBody
())
{
// Construct and print a CFG.
// Serialize the decl.
Janitor
<
CFG
>
cfg
(
CFG
::
buildCFG
(
FD
->
getBody
()));
Sezr
.
EmitOwnedPtr
(
*
I
);
cfg
->
print
(
DeclPP
);
}
// Serialize the decl.
Sezr
.
EmitOwnedPtr
(
*
I
);
}
}
}
}
}
...
...
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