diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-09 16:57:22 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-09 16:57:22 +0000 |
| commit | 1719061bfd28f000b234fbdb43d84f1101b181b0 (patch) | |
| tree | 76d93ce2edfdfcf2c2f0e4740579263fbe738b3a /llvm/tools/llvm-upgrade/UpgradeParser.y.cvs | |
| parent | 87644df5bc61ae8f0a75db5cd566155ec1eeb946 (diff) | |
| download | bcm5719-llvm-1719061bfd28f000b234fbdb43d84f1101b181b0.tar.gz bcm5719-llvm-1719061bfd28f000b234fbdb43d84f1101b181b0.zip | |
Regenerate.
llvm-svn: 32400
Diffstat (limited to 'llvm/tools/llvm-upgrade/UpgradeParser.y.cvs')
| -rw-r--r-- | llvm/tools/llvm-upgrade/UpgradeParser.y.cvs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs index f53369d6031..126a37542e6 100644 --- a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs +++ b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs @@ -194,10 +194,16 @@ static std::string getCastUpgrade( // the original intent by replace the cast with a setne const char* comparator = SrcTy.isPointer() ? ", null" : (SrcTy.isFloatingPoint() ? ", 0.0" : ", 0"); - if (isConst) - Result = "setne (" + Source + comparator + ")"; - else - Result = "setne " + Source + comparator; +#if UPGRADE_SETCOND_OPS + const char* compareOp = SrcTy.isFloatingPoint() ? "setne " : "icmp ne "; +#else + const char* compareOp = "setne"; +#endif + if (isConst) { + Result = "(" + Source + comparator + ")"; + Result = compareOp + Result; + } else + Result = compareOp + Source + comparator; return Result; // skip cast processing below } ResolveType(SrcTy); |

