parent
87644df5bc
commit
1719061bfd
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -333,7 +333,7 @@
|
||||||
|
|
||||||
|
|
||||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
|
#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
|
||||||
typedef union YYSTYPE {
|
typedef union YYSTYPE {
|
||||||
std::string* String;
|
std::string* String;
|
||||||
TypeInfo Type;
|
TypeInfo Type;
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@
|
||||||
|
|
||||||
|
|
||||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||||
#line 279 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
|
#line 285 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y"
|
||||||
typedef union YYSTYPE {
|
typedef union YYSTYPE {
|
||||||
std::string* String;
|
std::string* String;
|
||||||
TypeInfo Type;
|
TypeInfo Type;
|
||||||
|
|
|
||||||
|
|
@ -194,10 +194,16 @@ static std::string getCastUpgrade(
|
||||||
// the original intent by replace the cast with a setne
|
// the original intent by replace the cast with a setne
|
||||||
const char* comparator = SrcTy.isPointer() ? ", null" :
|
const char* comparator = SrcTy.isPointer() ? ", null" :
|
||||||
(SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
|
(SrcTy.isFloatingPoint() ? ", 0.0" : ", 0");
|
||||||
if (isConst)
|
#if UPGRADE_SETCOND_OPS
|
||||||
Result = "setne (" + Source + comparator + ")";
|
const char* compareOp = SrcTy.isFloatingPoint() ? "setne " : "icmp ne ";
|
||||||
else
|
#else
|
||||||
Result = "setne " + Source + comparator;
|
const char* compareOp = "setne";
|
||||||
|
#endif
|
||||||
|
if (isConst) {
|
||||||
|
Result = "(" + Source + comparator + ")";
|
||||||
|
Result = compareOp + Result;
|
||||||
|
} else
|
||||||
|
Result = compareOp + Source + comparator;
|
||||||
return Result; // skip cast processing below
|
return Result; // skip cast processing below
|
||||||
}
|
}
|
||||||
ResolveType(SrcTy);
|
ResolveType(SrcTy);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue