diff options
| author | Bob Haarman <llvm@inglorion.net> | 2017-06-09 01:18:10 +0000 |
|---|---|---|
| committer | Bob Haarman <llvm@inglorion.net> | 2017-06-09 01:18:10 +0000 |
| commit | fdf499bf2d589bee2a6a3da49a74840c4c511c59 (patch) | |
| tree | 9755204587b2c2bd79d6121f8b6343145016c934 /llvm | |
| parent | 6b901217dc4f221a40efa12e0cbf2bf0bc944d9d (diff) | |
| download | bcm5719-llvm-fdf499bf2d589bee2a6a3da49a74840c4c511c59.tar.gz bcm5719-llvm-fdf499bf2d589bee2a6a3da49a74840c4c511c59.zip | |
[codeview] use 32-bit integer for RelocOffset in DebugLinesSubsection
Summary:
RelocOffset is a 32-bit value, but we previously truncated it to 16 bits.
Fixes PR33335.
Reviewers: zturner, hiraditya!
Reviewed By: zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D33968
llvm-svn: 305043
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h | 4 | ||||
| -rw-r--r-- | llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/PDB/Inputs/debug-subsections.yaml | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h b/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h index 1b63af59c2e..b31c9f8f0fd 100644 --- a/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h +++ b/llvm/include/llvm/DebugInfo/CodeView/DebugLinesSubsection.h @@ -122,7 +122,7 @@ public: uint32_t calculateSerializedSize() const override; Error commit(BinaryStreamWriter &Writer) const override; - void setRelocationAddress(uint16_t Segment, uint16_t Offset); + void setRelocationAddress(uint16_t Segment, uint32_t Offset); void setCodeSize(uint32_t Size); void setFlags(LineFlags Flags); @@ -131,7 +131,7 @@ public: private: DebugChecksumsSubsection &Checksums; - uint16_t RelocOffset = 0; + uint32_t RelocOffset = 0; uint16_t RelocSegment = 0; uint32_t CodeSize = 0; LineFlags Flags = LF_None; diff --git a/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp index 2fce06ca2a1..33a8f78beb3 100644 --- a/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp +++ b/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp @@ -145,7 +145,7 @@ uint32_t DebugLinesSubsection::calculateSerializedSize() const { } void DebugLinesSubsection::setRelocationAddress(uint16_t Segment, - uint16_t Offset) { + uint32_t Offset) { RelocOffset = Offset; RelocSegment = Segment; } diff --git a/llvm/test/DebugInfo/PDB/Inputs/debug-subsections.yaml b/llvm/test/DebugInfo/PDB/Inputs/debug-subsections.yaml index efe79b976d5..ab199d2f21a 100644 --- a/llvm/test/DebugInfo/PDB/Inputs/debug-subsections.yaml +++ b/llvm/test/DebugInfo/PDB/Inputs/debug-subsections.yaml @@ -38,7 +38,7 @@ DbiStream: - !Lines CodeSize: 10 Flags: [ ] - RelocOffset: 16 + RelocOffset: 100016 RelocSegment: 1 Blocks: - FileName: 'd:\src\llvm\test\debuginfo\pdb\inputs\empty.cpp' |

