summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-upgrade/UpgradeParser.y
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-06 00:12:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-06 00:12:05 +0000
commitbfa5df2604a2fee24216272a8c2f3f1208627a98 (patch)
treeb667310b66666f51971d4fc5cb819513c4b8134f /llvm/tools/llvm-upgrade/UpgradeParser.y
parent8bc7ddb84dea6f8a0bc664923fe724176a04c23f (diff)
downloadbcm5719-llvm-bfa5df2604a2fee24216272a8c2f3f1208627a98.tar.gz
bcm5719-llvm-bfa5df2604a2fee24216272a8c2f3f1208627a98.zip
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
Diffstat (limited to 'llvm/tools/llvm-upgrade/UpgradeParser.y')
-rw-r--r--llvm/tools/llvm-upgrade/UpgradeParser.y4
1 files changed, 2 insertions, 2 deletions
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;
}
OpenPOWER on IntegriCloud