Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
2
2024ustc-jianmu-compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
compiler_staff
2024ustc-jianmu-compiler
Commits
ff3807a8
Commit
ff3807a8
authored
Oct 14, 2024
by
lyz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lab2:fix a bug int cminusf_builder.cpp( get_terminator -> is_terminated )
parent
da409e47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/cminusfc/cminusf_builder.cpp
src/cminusfc/cminusf_builder.cpp
+2
-2
No files found.
src/cminusfc/cminusf_builder.cpp
View file @
ff3807a8
...
...
@@ -76,7 +76,7 @@ Value* CminusfBuilder::visit(ASTFunDeclaration &node) {
// TODO: You need to deal with params and store them in the scope.
}
node
.
compound_stmt
->
accept
(
*
this
);
if
(
builder
->
get_insert_block
()
->
get_terminator
()
==
nullptr
)
if
(
not
builder
->
get_insert_block
()
->
is_terminated
()
)
{
if
(
context
.
func
->
get_return_type
()
->
is_void_type
())
builder
->
create_void_ret
();
...
...
@@ -106,7 +106,7 @@ Value* CminusfBuilder::visit(ASTCompoundStmt &node) {
for
(
auto
&
stmt
:
node
.
statement_list
)
{
stmt
->
accept
(
*
this
);
if
(
builder
->
get_insert_block
()
->
get_terminator
()
==
nullptr
)
if
(
builder
->
get_insert_block
()
->
is_terminated
()
)
break
;
}
return
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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