summaryrefslogtreecommitdiffstats
path: root/clang/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
commit4d45b34a8ad55041191973a711c0d2dd8ab18b95 (patch)
tree8b92a7a13f478069d20fadf1c33dbc7a680eaf24 /clang/lib/Analysis/BasicValueFactory.cpp
parent3b0f3ef97eee2c21f03d66885b2d89e592f53545 (diff)
downloadbcm5719-llvm-4d45b34a8ad55041191973a711c0d2dd8ab18b95.tar.gz
bcm5719-llvm-4d45b34a8ad55041191973a711c0d2dd8ab18b95.zip
Initial support for checking out of bound memory access. Only support
ConcreteInt index for now. llvm-svn: 59869
Diffstat (limited to 'clang/lib/Analysis/BasicValueFactory.cpp')
-rw-r--r--clang/lib/Analysis/BasicValueFactory.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/BasicValueFactory.cpp b/clang/lib/Analysis/BasicValueFactory.cpp
index 5b7041bc43c..7ce305e4cf5 100644
--- a/clang/lib/Analysis/BasicValueFactory.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud