diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-09-27 22:18:51 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-09-27 22:18:51 +0000 |
commit | b060a46b0de75d6ab711b60d123ab42a9a6d7b3c (patch) | |
tree | e9d3ab31f9c4dc3c5a78d37c0c68679726d45508 /lib/Analysis | |
parent | 5972df2696354b328b519bedc07d1c253648cf0e (diff) | |
download | external_llvm-b060a46b0de75d6ab711b60d123ab42a9a6d7b3c.zip external_llvm-b060a46b0de75d6ab711b60d123ab42a9a6d7b3c.tar.gz external_llvm-b060a46b0de75d6ab711b60d123ab42a9a6d7b3c.tar.bz2 |
Use type helper functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191574 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/BasicAliasAnalysis.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 9de5b22..bf92969 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -313,8 +313,7 @@ DecomposeGEPExpression(const Value *V, int64_t &BaseOffs, } // Don't attempt to analyze GEPs over unsized objects. - if (!cast<PointerType>(GEPOp->getOperand(0)->getType()) - ->getElementType()->isSized()) + if (!GEPOp->getOperand(0)->getType()->getPointerElementType()->isSized()) return V; // If we are lacking DataLayout information, we can't compute the offets of @@ -354,7 +353,7 @@ DecomposeGEPExpression(const Value *V, int64_t &BaseOffs, // If the integer type is smaller than the pointer size, it is implicitly // sign extended to pointer size. - unsigned Width = cast<IntegerType>(Index->getType())->getBitWidth(); + unsigned Width = Index->getType()->getIntegerBitWidth(); if (TD->getPointerSizeInBits() > Width) Extension = EK_SignExt; |