Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
f12c4fe2
Unverified
Commit
f12c4fe2
authored
Jan 05, 2020
by
Tianqi Chen
Committed by
GitHub
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get around limitation of g++-4.8 (#4626)
parent
86dcb1e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
src/pass/ir_functor.cc
+12
-2
No files found.
src/pass/ir_functor.cc
View file @
f12c4fe2
...
...
@@ -71,18 +71,28 @@ class IRTransformer final :
f_postorder_
(
f_postorder
),
only_enable_
(
only_enable
)
{
}
Stmt
VisitStmt
(
const
Stmt
&
stmt
)
final
{
return
MutateInternal
<
Stmt
>
(
stmt
,
[
this
](
const
Stmt
&
s
)
{
return
StmtMutator
::
VisitStmt
(
s
);
return
this
->
Base
VisitStmt
(
s
);
});
}
Expr
VisitExpr
(
const
Expr
&
expr
)
final
{
return
MutateInternal
<
Expr
>
(
expr
,
[
this
](
const
Expr
&
e
)
{
return
ExprMutator
::
VisitExpr
(
e
);
return
this
->
Base
VisitExpr
(
e
);
});
}
private
:
// NOTE: redirect to parent's call
// This is used to get around limitation of gcc-4.8
Stmt
BaseVisitStmt
(
const
Stmt
&
s
)
{
return
StmtMutator
::
VisitStmt
(
s
);
}
Expr
BaseVisitExpr
(
const
Expr
&
e
)
{
return
ExprMutator
::
VisitExpr
(
e
);
}
template
<
typename
T
,
typename
F
>
T
MutateInternal
(
const
T
&
node
,
F
fmutate
)
{
if
(
only_enable_
.
size
()
&&
...
...
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