diff options
| author | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-08-06 10:47:20 +0000 |
|---|---|---|
| committer | Igor Kudrin <ikudrin@accesssoftek.com> | 2019-08-06 10:47:20 +0000 |
| commit | f5f35c5cd110e22c4b216ec1dc53255e32adc011 (patch) | |
| tree | ff284ebcb776857fe4043391261ae627d08321f3 /llvm/unittests/DebugInfo | |
| parent | 7b24dd741c6c4734f8cf5b9fafc12bf9e38411d6 (diff) | |
| download | bcm5719-llvm-f5f35c5cd110e22c4b216ec1dc53255e32adc011.tar.gz bcm5719-llvm-f5f35c5cd110e22c4b216ec1dc53255e32adc011.zip | |
Support 64-bit offsets in utility classes (1/5)
Using 64-bit offsets is required to fully implement 64-bit DWARF.
As these classes are used in many different libraries they should
temporarily support both 32- and 64-bit offsets.
Differential Revision: https://reviews.llvm.org/D64006
llvm-svn: 368013
Diffstat (limited to 'llvm/unittests/DebugInfo')
| -rw-r--r-- | llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp index c40db0751ee..097c160bf46 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp @@ -41,7 +41,7 @@ template<typename RawTypeT> DWARFFormValue createDataXFormValue(dwarf::Form Form, RawTypeT Value) { char Raw[sizeof(RawTypeT)]; memcpy(Raw, &Value, sizeof(RawTypeT)); - uint32_t Offset = 0; + uint64_t Offset = 0; DWARFFormValue Result(Form); DWARFDataExtractor Data(StringRef(Raw, sizeof(RawTypeT)), sys::IsLittleEndianHost, sizeof(void *)); @@ -53,7 +53,7 @@ DWARFFormValue createULEBFormValue(uint64_t Value) { SmallString<10> RawData; raw_svector_ostream OS(RawData); encodeULEB128(Value, OS); - uint32_t Offset = 0; + uint64_t Offset = 0; DWARFFormValue Result(DW_FORM_udata); DWARFDataExtractor Data(OS.str(), sys::IsLittleEndianHost, sizeof(void *)); Result.extractValue(Data, &Offset, {0, 0, dwarf::DwarfFormat::DWARF32}); @@ -64,7 +64,7 @@ DWARFFormValue createSLEBFormValue(int64_t Value) { SmallString<10> RawData; raw_svector_ostream OS(RawData); encodeSLEB128(Value, OS); - uint32_t Offset = 0; + uint64_t Offset = 0; DWARFFormValue Result(DW_FORM_sdata); DWARFDataExtractor Data(OS.str(), sys::IsLittleEndianHost, sizeof(void *)); Result.extractValue(Data, &Offset, {0, 0, dwarf::DwarfFormat::DWARF32}); @@ -112,7 +112,7 @@ TEST(DWARFFormValue, SignedConstantForms) { DWARFFormValue Data16(DW_FORM_data16); DWARFDataExtractor DE16(StringRef(Cksum, 16), sys::IsLittleEndianHost, sizeof(void *)); - uint32_t Offset = 0; + uint64_t Offset = 0; Data16.extractValue(DE16, &Offset, {0, 0, dwarf::DwarfFormat::DWARF32}); SmallString<32> Str; raw_svector_ostream Res(Str); |

