aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Constants.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 079f156cca..1940e5b831 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -205,7 +205,7 @@ public:
int64_t V = getSExtValue();
if (V < 0) return false; // Be careful about wrap-around on 'long's
++V;
- return !isValueValidForType(getType(), V) || V < 0;
+ return !isValueValidForType(getType()->getSignedVersion(), V) || V < 0;
}
return isAllOnesValue();
}
@@ -219,7 +219,7 @@ public:
int64_t V = getSExtValue();
if (V > 0) return false; // Be careful about wrap-around on 'long's
--V;
- return !isValueValidForType(getType(), V) || V > 0;
+ return !isValueValidForType(getType()->getSignedVersion(), V) || V > 0;
}
return getZExtValue() == 0;
}