aboutsummaryrefslogtreecommitdiff
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
commit520071af0a9528014e68bcedcf9f5318c3d3cdd6 (patch)
tree96adb517a60778ae5675298aa60d0b53f4affc02
parentd08d23315d20c568fe35b8732d4a49d298b228c2 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32942 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/llvm-upgrade/UpgradeParser.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-upgrade/UpgradeParser.y b/tools/llvm-upgrade/UpgradeParser.y
index ca8ee4f52e..d5292a0464 100644
--- a/tools/llvm-upgrade/UpgradeParser.y
+++ b/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;
}