From bfa5df2604a2fee24216272a8c2f3f1208627a98 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 6 Jan 2007 00:12:05 +0000 Subject: For PR1080: Emit the correct syntax for icmp and fcmp constant expressions. The predicate goes outside the parentheses not inside. This was a change made in the assembler without the corresponding change made in llvm-upgrade. llvm-svn: 32942 --- llvm/tools/llvm-upgrade/UpgradeParser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/tools/llvm-upgrade/UpgradeParser.y') diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y b/llvm/tools/llvm-upgrade/UpgradeParser.y index ca8ee4f52e0..d5292a0464a 100644 --- a/llvm/tools/llvm-upgrade/UpgradeParser.y +++ b/llvm/tools/llvm-upgrade/UpgradeParser.y @@ -1160,12 +1160,12 @@ ConstExpr: CastOps '(' ConstVal TO Types ')' { $$ = $1; } | ICMP IPredicates '(' ConstVal ',' ConstVal ')' { - *$1 += "(" + *$2 + "," + *$4.cnst + "," + *$6.cnst + ")"; + *$1 += " " + *$2 + " (" + *$4.cnst + "," + *$6.cnst + ")"; delete $2; $4.destroy(); $6.destroy(); $$ = $1; } | FCMP FPredicates '(' ConstVal ',' ConstVal ')' { - *$1 += "(" + *$2 + "," + *$4.cnst + "," + *$6.cnst + ")"; + *$1 += " " + *$2 + " (" + *$4.cnst + "," + *$6.cnst + ")"; delete $2; $4.destroy(); $6.destroy(); $$ = $1; } -- cgit v1.2.3