diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-01-29 20:34:28 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-01-29 20:34:28 +0000 |
commit | 963e84f9fcbbfadf69f26f1604e8a588081a6d88 (patch) | |
tree | 5f2f8c745024d2f155b7770cd4bcd27612a3f4f6 /lib/Transforms/Utils/Local.cpp | |
parent | 43ee50fcf094a8a189aa299605c16958d3f33379 (diff) |
Use uint64_t instead of unsigned for offsets and sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index f0097d0362..425f557296 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -44,7 +44,7 @@ using namespace llvm; /// This is closely related to Value::getUnderlyingObject but is located /// here to avoid making VMCore depend on TargetData. static Value *getUnderlyingObjectWithOffset(Value *V, const TargetData *TD, - unsigned &ByteOffset, + uint64_t &ByteOffset, unsigned MaxLookup = 6) { if (!isa<PointerType>(V->getType())) return V; @@ -76,7 +76,7 @@ static Value *getUnderlyingObjectWithOffset(Value *V, const TargetData *TD, /// ScanFrom, to determine if the address is already accessed. bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom, const TargetData *TD) { - unsigned ByteOffset = 0; + uint64_t ByteOffset = 0; Value *Base = V; if (TD) Base = getUnderlyingObjectWithOffset(V, TD, ByteOffset); @@ -98,7 +98,7 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom, if (BaseType->isSized()) { // Check if the load is within the bounds of the underlying object. const PointerType *AddrTy = cast<PointerType>(V->getType()); - unsigned LoadSize = TD->getTypeStoreSize(AddrTy->getElementType()); + uint64_t LoadSize = TD->getTypeStoreSize(AddrTy->getElementType()); if (ByteOffset + LoadSize <= TD->getTypeAllocSize(BaseType)) return true; } |