diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-08 13:31:36 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-10-08 13:31:36 -0600 |
commit | 340f3d1a30449912d73a49cba41be76d29ace36b (patch) | |
tree | 4bf5cf36f6ad7acab5203c17129c7ea9b5351b61 /lib/chillcg/src | |
parent | 9cf3d7b307d1dc810fa205bcfa8470cee7c7541e (diff) | |
download | chill-340f3d1a30449912d73a49cba41be76d29ace36b.tar.gz chill-340f3d1a30449912d73a49cba41be76d29ace36b.tar.bz2 chill-340f3d1a30449912d73a49cba41be76d29ace36b.zip |
fixes
Diffstat (limited to 'lib/chillcg/src')
-rwxr-xr-x | lib/chillcg/src/CG_chillBuilder.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/chillcg/src/CG_chillBuilder.cc b/lib/chillcg/src/CG_chillBuilder.cc index 966c20f..74622d7 100755 --- a/lib/chillcg/src/CG_chillBuilder.cc +++ b/lib/chillcg/src/CG_chillBuilder.cc @@ -246,12 +246,11 @@ namespace omega { CG_outputRepr *CGOR; CG_chillRepr *CGCR; char macroname[32]; - char op; - if (fname == std::string("max")) op = '>'; - else op = '<'; - // TODO >, check number of args etc - chillAST_Node *ternary = lessthanmacro( ((CG_chillRepr*) list[0])->chillnodes[0], - ((CG_chillRepr*) list[1])->chillnodes[0]); + const char * op; + if (fname == std::string("max")) op = ">"; + else op = "<"; + chillAST_Node *ternary = minmaxTernary( op, ((CG_chillRepr*) list[0])->chillnodes[0], + ((CG_chillRepr*) list[1])->chillnodes[0]); CG_chillRepr *repr = new CG_chillRepr( ternary ); return repr; } |