summaryrefslogtreecommitdiff
path: root/src/ast/node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/node.cpp')
-rw-r--r--src/ast/node.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ast/node.cpp b/src/ast/node.cpp
index d0a80e9..deee5ba 100644
--- a/src/ast/node.cpp
+++ b/src/ast/node.cpp
@@ -264,7 +264,7 @@ chillAST_Node* chillAST_Node::constantFold(){
CHILL_DEBUG_PRINT("Using generic\n");
for (int i = 0;i<getNumChildren();++i) {
if (getChild(i))
- getChild(i)->constantFold();
+ setChild(i,getChild(i)->constantFold());
}
return this;
};
@@ -326,7 +326,13 @@ void chillAST_Node::replaceVarDecls(chillAST_VarDecl* olddecl, chillAST_VarDecl
}
}
-
+void chillAST_Node::gatherScalarVarDecls(vector<chillAST_VarDecl *> &decls) {
+ CHILL_DEBUG_PRINT("using generic\n");
+ for (int i = 0;i<getNumChildren();++i) {
+ if (getChild(i))
+ getChild(i)->gatherScalarVarDecls(decls);
+ }
+}