From 340f3d1a30449912d73a49cba41be76d29ace36b Mon Sep 17 00:00:00 2001
From: Tuowen Zhao <ztuowen@gmail.com>
Date: Sat, 8 Oct 2016 13:31:36 -0600
Subject: fixes

---
 include/chillAST/chillAST_def.hh |  2 +-
 include/chillAST/chillASTs.hh    | 13 ++++---------
 2 files changed, 5 insertions(+), 10 deletions(-)

(limited to 'include/chillAST')

diff --git a/include/chillAST/chillAST_def.hh b/include/chillAST/chillAST_def.hh
index 7a9528e..e246943 100644
--- a/include/chillAST/chillAST_def.hh
+++ b/include/chillAST/chillAST_def.hh
@@ -199,7 +199,7 @@ chillAST_VarDecl *symbolTableFindVariableNamed(chillAST_SymbolTable *table,
 
 chillAST_TypedefDecl *typedefTableFindName(chillAST_TypedefTable *table, const char *name);
 
-chillAST_Node *lessthanmacro(chillAST_Node *left, chillAST_Node *right);
+chillAST_Node *minmaxTernary(const char *op, chillAST_Node *left, chillAST_Node *right);
 
 chillAST_SymbolTable *addSymbolToTable(chillAST_SymbolTable *st, chillAST_VarDecl *vd);
 
diff --git a/include/chillAST/chillASTs.hh b/include/chillAST/chillASTs.hh
index f49cf6f..67189dc 100644
--- a/include/chillAST/chillASTs.hh
+++ b/include/chillAST/chillASTs.hh
@@ -265,7 +265,6 @@ public:
   // required methods
   void replaceChild(chillAST_Node *old, chillAST_Node *newchild);
 
-  chillAST_Node *constantFold();
 
   chillAST_Node *clone();
 
@@ -409,8 +408,6 @@ public:
   //void replaceVarDecls( chillAST_VarDecl *olddecl, chillAST_VarDecl *newdecl);
   bool findLoopIndexesToReplace(chillAST_SymbolTable *symtab, bool forcesync = false);
 
-  chillAST_Node *constantFold();
-
 };  // end FunctionDecl
 
 class chillAST_SourceFile : public chillAST_Node {
@@ -596,9 +593,9 @@ public:
 
   chillAST_Node *getCond() { return getChild(0); };
 
-  chillAST_Node *getRHS() { return getChild(1); };
+  chillAST_Node *getLHS() { return getChild(1); };
 
-  chillAST_Node *getLHS() { return getChild(2); };
+  chillAST_Node *getRHS() { return getChild(2); };
 
   void setCond(chillAST_Node *newc) { setChild(0, newc); }
 
@@ -811,8 +808,6 @@ public:
   int evalAsInt() { return value; }
 
   // required methods that I can't seem to get to inherit
-  chillAST_Node *constantFold();
-
   chillAST_Node *clone();
 
   bool findLoopIndexesToReplace(chillAST_SymbolTable *symtab,
@@ -843,8 +838,6 @@ public:
   int getPrecision() { return precision; }
 
   // required methods that I can't seem to get to inherit
-  chillAST_Node *constantFold();
-
   chillAST_Node *clone();
 
   bool findLoopIndexesToReplace(chillAST_SymbolTable *symtab,
@@ -944,6 +937,8 @@ public:
   // required methods that I can't seem to get to inherit
   chillAST_Node *getSubExpr() { return getChild(0); }
 
+  chillAST_Node *constantFold();
+
   void setSubExpr(chillAST_Node *sub) { return setChild(0, sub); }
 
   chillAST_Node *clone();
-- 
cgit v1.2.3-70-g09d2