Skip to content

Commit f78008a

Browse files
committed
Merge pull request #86 from afernandez90/develop
if-else C code generation modified to rely on remap
2 parents c0afa3b + 91441e4 commit f78008a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/common/IfThenElse.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,7 @@ trait CGenIfThenElse extends CGenEffect with BaseGenIfThenElse {
384384
emitBlock(b)
385385
stream.println("}")
386386
case _ =>
387-
if (isPrimitiveType(sym.tp))
388-
stream.println("%s %s;".format(remap(sym.tp),quote(sym)))
389-
else
390-
stream.println("%s *%s;".format(remap(sym.tp),quote(sym)))
387+
stream.println("%s %s;".format(remap(sym.tp),quote(sym)))
391388
stream.println("if (" + quote(c) + ") {")
392389
emitBlock(a)
393390
stream.println("%s = %s;".format(quote(sym),quote(getBlockResult(a))))

0 commit comments

Comments
 (0)