Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
systemc-clang
Commits
5369455b
Commit
5369455b
authored
Jul 05, 2019
by
rmrf
Browse files
Testing code formatting
parent
8876d137
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/FindGlobalEvents.cpp
View file @
5369455b
...
...
@@ -38,8 +38,7 @@ void FindGlobalEvents::dump() {
json
FindGlobalEvents
::
dump_json
()
{
json
globals_j
{};
for
(
auto
const
&
event
:
_globalEvents
)
{
for
(
auto
const
&
event
:
_globalEvents
)
{
globals_j
[
"global_declarations"
].
emplace_back
(
event
.
first
)
;
}
std
::
cout
<<
globals_j
.
dump
(
4
)
<<
endl
;
...
...
src/SystemCClang.cpp
View file @
5369455b
...
...
@@ -30,7 +30,7 @@ bool SystemCConsumer::fire() {
mitend
=
scmodules
.
end
();
mit
!=
mitend
;
++
mit
)
{
ModuleDecl
*
md
=
new
ModuleDecl
{
mit
->
first
,
mit
->
second
};
//md->setTemplateParameters( scmod.getTemplateParameters() );
// os_ << "SIZE: " << scmod.getTemplateParameters().size() << "\n";
// os_ << "SIZE: " << scmod.getTemplateParameters().size() << "\n";
_systemcModel
->
addModuleDecl
(
md
);
}
...
...
@@ -73,7 +73,7 @@ bool SystemCConsumer::fire() {
ModuleDecl
*
md
=
new
ModuleDecl
{};
// Find the template arguments for the class.
FindTemplateParameters
tparms
{
mainmd
->
getModuleClassDecl
(),
os_
};
FindTemplateParameters
tparms
{
mainmd
->
getModuleClassDecl
(),
os_
};
md
->
setTemplateParameters
(
tparms
.
getTemplateParameters
()
);
os_
<<
"@@# "
<<
mainmd
->
getTemplateParameters
().
size
()
<<
"
\n
"
;
...
...
@@ -105,7 +105,8 @@ bool SystemCConsumer::fire() {
for
(
size_t
i
=
0
;
i
<
entryFunctions
->
size
();
i
++
)
{
EntryFunctionContainer
*
ef
{(
*
entryFunctions
)[
i
]};
FindSensitivity
findSensitivity
{
constructor
.
returnConstructorStmt
(),
os_
};
FindSensitivity
findSensitivity
{
constructor
.
returnConstructorStmt
(),
os_
};
ef
->
addSensitivityInfo
(
findSensitivity
);
if
(
ef
->
getEntryMethod
()
==
nullptr
)
{
...
...
@@ -219,8 +220,11 @@ void SystemCConsumer::HandleTranslationUnit(ASTContext &context) {
}
SystemCConsumer
::
SystemCConsumer
(
CompilerInstance
&
ci
)
:
os_
{
llvm
::
errs
()},
_sm
{
ci
.
getSourceManager
()},
_context
{
ci
.
getASTContext
()},
_ci
{
ci
},
_systemcModel
{
nullptr
}
{}
:
os_
{
llvm
::
errs
()},
_sm
{
ci
.
getSourceManager
()},
_context
{
ci
.
getASTContext
()},
_ci
{
ci
},
_systemcModel
{
nullptr
}
{}
SystemCConsumer
::~
SystemCConsumer
()
{
if
(
_systemcModel
!=
nullptr
)
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment