diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/chill_ast.hh | 6 | ||||
-rw-r--r-- | include/chilldebug.h | 17 | ||||
-rwxr-xr-x | include/ir_clang.hh | 4 | ||||
-rw-r--r-- | include/ir_code.hh | 1 |
4 files changed, 19 insertions, 9 deletions
diff --git a/include/chill_ast.hh b/include/chill_ast.hh index a0cfe2d..43eb106 100644 --- a/include/chill_ast.hh +++ b/include/chill_ast.hh @@ -293,8 +293,8 @@ public: } virtual void replaceChild( chillAST_node *old, chillAST_node *newchild ) { - fprintf(stderr,"(%s) forgot to implement replaceChild() ... using generic\n" ,Chill_AST_Node_Names[asttype]); - fprintf(stderr, "%d children\n", children.size()); + fprintf(stderr,"(%s) forgot to implement replaceChild() ... using generic\n" ,Chill_AST_Node_Names[asttype]); + fprintf(stderr, "%d children\n", children.size()); for (int i=0; i<children.size(); i++) { if (children[i] == old) { children[i] = newchild; @@ -302,7 +302,7 @@ public: return; } } - fprintf(stderr, "%s %p generic replaceChild called with oldchild that was not a child\n", + fprintf(stderr, "%s %p generic replaceChild called with oldchild that was not a child\n", getTypeString(), this) ; fprintf(stderr, "printing\n"); print(); fprintf(stderr, "\nchild: "); diff --git a/include/chilldebug.h b/include/chilldebug.h index 8678749..f187955 100644 --- a/include/chilldebug.h +++ b/include/chilldebug.h @@ -1,13 +1,20 @@ - -// a central place to turn on debugging messages - #ifndef DEBUGCHILL_H #define DEBUGCHILL_H +#ifndef NDEBUG // means that CMAKE_BUILD_TYPE=Debug +#define DEBUGCHILL +#endif + #ifdef DEBUGCHILL -#define DEBUG_PRINT(args...) fprintf(stderr, args ) +#define CHILL_DEBUG_PRINT(format,args...) fprintf(stderr,"%s,%s,LN%d:\n\t" format,__FILE__,__FUNCTION__,__LINE__, ##args ) +#define CHILL_DEBUG_BEGIN { \ + fprintf(stderr,"%s,%s,LN%d:\n",__FILE__,__FUNCTION__,__LINE__); +#define CHILL_DEBUG_END } #else -#define DEBUG_PRINT(args...) do {} while(0) /* Don't do anything */ +#define CHILL_DEBUG_PRINT(format,args...) do {} while(0) /* Don't do anything */ +#define CHILL_DEBUG_BEGIN do { +#define CHILL_DEBUG_END } while (0); #endif + #endif diff --git a/include/ir_clang.hh b/include/ir_clang.hh index 50fb5dd..b283359 100755 --- a/include/ir_clang.hh +++ b/include/ir_clang.hh @@ -80,7 +80,9 @@ struct IR_chillArraySymbol: public IR_ArraySymbol { bool operator==(const IR_Symbol &that) const; IR_Symbol *clone() const; // TODO Hack to pass build - IR_CONSTANT_TYPE elem_type() const {return IR_CONSTANT_UNKNOWN;}; + IR_CONSTANT_TYPE elem_type() const { + fprintf(stderr,"Not implemented elem_type in IR_chillArraySymbol"); + return IR_CONSTANT_UNKNOWN;}; }; diff --git a/include/ir_code.hh b/include/ir_code.hh index 850bcc3..f52d147 100644 --- a/include/ir_code.hh +++ b/include/ir_code.hh @@ -248,6 +248,7 @@ struct IR_While: public IR_Control { // Abstract class for compiler IR. +// TODO made a lot of definition to pass instantiation for IR_clangCode class IR_Code { protected: // the only data members in IR_Code are Omega classes |