aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicValueFactory.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-11-22 13:21:46 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-11-22 13:21:46 +0000
commite8a964bdb46349e4fa3433c8e5104d2a0f7f5c65 (patch)
tree7ee508e61cd1fd98e1e3412e54bcd037104ad779 /lib/Analysis/BasicValueFactory.cpp
parent254be6ac14092e0bdd9e632dfea09f237850e63d (diff)
Initial support for checking out of bound memory access. Only support
ConcreteInt index for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicValueFactory.cpp')
-rw-r--r--lib/Analysis/BasicValueFactory.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/BasicValueFactory.cpp b/lib/Analysis/BasicValueFactory.cpp
index 5b7041bc43..7ce305e4cf 100644
--- a/lib/Analysis/BasicValueFactory.cpp
+++ b/lib/Analysis/BasicValueFactory.cpp
@@ -76,6 +76,12 @@ const llvm::APSInt& BasicValueFactory::getValue(const llvm::APSInt& X) {
return *P;
}
+const llvm::APSInt& BasicValueFactory::getValue(const llvm::APInt& X,
+ bool isUnsigned) {
+ llvm::APSInt V(X, isUnsigned);
+ return getValue(V);
+}
+
const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, unsigned BitWidth,
bool isUnsigned) {
llvm::APSInt V(BitWidth, isUnsigned);