diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-07-13 03:42:38 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-07-13 03:42:38 +0000 |
commit | 17c5ce914ce1bb9b8583a57c4fd566224104ecc0 (patch) | |
tree | 8d94f33d671f2e2969c5160185e775b074a1a255 /include | |
parent | 43ac9a4a1eda23eaf81995b6abdb2b157c86ffe5 (diff) |
[IR] Make getIndexedOffsetInType return a signed result
A GEPed offset can go negative, the result of getIndexedOffsetInType
should according be a signed type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/IR/DataLayout.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h index ed71ae7c223..173121b72ff 100644 --- a/include/llvm/IR/DataLayout.h +++ b/include/llvm/IR/DataLayout.h @@ -440,7 +440,7 @@ public: /// /// Note that this takes the element type, not the pointer type. /// This is used to implement getelementptr. - uint64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef<Value *> Indices) const; + int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef<Value *> Indices) const; /// \brief Returns a StructLayout object, indicating the alignment of the /// struct, its size, and the offsets of its fields. |