diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-01-05 21:05:54 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-01-05 21:05:54 +0000 |
commit | d2564e3afb1d9fe42c4b092dfd0bcf472aa535e1 (patch) | |
tree | 779af716dfcdb72a3855bb1da70efb9a50da01d5 /llvm/lib/Analysis | |
parent | fd7e42b65d7bd07eb956f2605216b9b3419263a9 (diff) | |
download | bcm5719-llvm-d2564e3afb1d9fe42c4b092dfd0bcf472aa535e1.tar.gz bcm5719-llvm-d2564e3afb1d9fe42c4b092dfd0bcf472aa535e1.zip |
Move remaining stuff to the isInteger predicate.
llvm-svn: 92771
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index acd3119abea..9a106248126 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -1348,7 +1348,7 @@ bool llvm::GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset, // Make sure the index-ee is a pointer to array of i8. const PointerType *PT = cast<PointerType>(GEP->getOperand(0)->getType()); const ArrayType *AT = dyn_cast<ArrayType>(PT->getElementType()); - if (AT == 0 || AT->getElementType() != Type::getInt8Ty(V->getContext())) + if (AT == 0 || !AT->getElementType()->isInteger(8)) return false; // Check to make sure that the first operand of the GEP is an integer and @@ -1387,8 +1387,7 @@ bool llvm::GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset, // Must be a Constant Array ConstantArray *Array = dyn_cast<ConstantArray>(GlobalInit); - if (Array == 0 || - Array->getType()->getElementType() != Type::getInt8Ty(V->getContext())) + if (Array == 0 || !Array->getType()->getElementType()->isInteger(8)) return false; // Get the number of elements in the array |