From db3ff28ba74ff76aaac9e73d1b208e17992864cb Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Sat, 1 Oct 2016 14:34:28 -0600 Subject: fixing output --- include/chillAST/chillAST_def.hh | 2 -- include/chillAST/chillAST_node.hh | 1 + include/chillAST/chillASTs.hh | 22 ++-------------------- 3 files changed, 3 insertions(+), 22 deletions(-) (limited to 'include') diff --git a/include/chillAST/chillAST_def.hh b/include/chillAST/chillAST_def.hh index ca90561..acdce08 100644 --- a/include/chillAST/chillAST_def.hh +++ b/include/chillAST/chillAST_def.hh @@ -206,8 +206,6 @@ void chillindent(int i, FILE *fp); void insertNewDeclAtLocationOfOldIfNeeded(chillAST_VarDecl *newdecl, chillAST_VarDecl *olddecl); -chillAST_DeclRefExpr *buildDeclRefExpr(chillAST_VarDecl *); - chillAST_FunctionDecl *findFunctionDecl(chillAST_Node *node, const char *procname); #endif diff --git a/include/chillAST/chillAST_node.hh b/include/chillAST/chillAST_node.hh index dcaa9d0..95480a4 100644 --- a/include/chillAST/chillAST_node.hh +++ b/include/chillAST/chillAST_node.hh @@ -318,6 +318,7 @@ public: //! Actual declaration virtual void gatherScalarVarDecls(std::vector &decls); + //! Actual declaration virtual void gatherArrayVarDecls(std::vector &decls); virtual chillAST_VarDecl *findArrayDecl(const char *name) { // scoping TODO diff --git a/include/chillAST/chillASTs.hh b/include/chillAST/chillASTs.hh index ca3816f..9ae3617 100644 --- a/include/chillAST/chillASTs.hh +++ b/include/chillAST/chillASTs.hh @@ -83,7 +83,6 @@ public: chillAST_TypedefDecl(char *t, const char *nt, char *a); const char *getUnderlyingType() { - fprintf(stderr, "TypedefDecl getUnderLyingType()\n"); return underlyingtype; }; }; @@ -178,18 +177,12 @@ public: void gatherArrayVarDecls(std::vector &decls); - void gatherVarUsage(std::vector &decls) {}; // does nothing - void gatherDeclRefExprs(std::vector &refs) {}; // does nothing - void replaceVarDecls(chillAST_VarDecl *olddecl, chillAST_VarDecl *newdecl) {}; - bool findLoopIndexesToReplace(chillAST_SymbolTable *symtab, bool forcesync = false) { return false; }; // no loops under here const char *getUnderlyingType() { /* fprintf(stderr, "VarDecl getUnderLyingType()\n"); */return underlyingtype; }; virtual chillAST_VarDecl *getUnderlyingVarDecl() { return this; }; - chillAST_Node *constantFold(); - chillAST_Node *clone(); }; @@ -231,23 +224,12 @@ public: }; // required methods that I can't seem to get to inherit - chillAST_Node *constantFold(); - chillAST_Node *clone(); - void gatherArrayRefs(std::vector &refs, bool writtento) {}; // do nothing void gatherScalarRefs(std::vector &refs, bool writtento); - // this is the AST node where these 2 differ - void gatherVarDecls( - std::vector &decls) {}; // does nothing, to get the cvardecl using this method, the actual vardecl must be in the AST - void gatherVarDeclsMore( - std::vector &decls); // returns the decl this declrefexpr references, even if the decl is not in the AST - - - void gatherScalarVarDecls(std::vector &decls); - - void gatherArrayVarDecls(std::vector &decls); + //! returns the decl this declrefexpr references, even if the decl is not in the AST + void gatherVarDeclsMore(std::vector &decls); void gatherVarUsage(std::vector &decls); -- cgit v1.2.3-70-g09d2