diff options
author | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2020-03-22 22:20:04 -0400 |
---|---|---|
committer | Arthur O'Dwyer <arthur.j.odwyer@gmail.com> | 2020-12-22 19:54:29 -0500 |
commit | 22cf54a7fba670642c121684ac3c7ff7e35dfa5c (patch) | |
tree | 210312c900fddabbd86b68a8b5a8f2915da47fd3 /llvm/lib/Object/XCOFFObjectFile.cpp | |
parent | faac1c02c802048efa17f8f6cda8f39b5584f0c6 (diff) | |
download | llvm-22cf54a7fba670642c121684ac3c7ff7e35dfa5c.zip llvm-22cf54a7fba670642c121684ac3c7ff7e35dfa5c.tar.gz llvm-22cf54a7fba670642c121684ac3c7ff7e35dfa5c.tar.bz2 |
Replace `T(x)` with `reinterpret_cast<T>(x)` everywhere it means reinterpret_cast. NFC.
Differential Revision: https://reviews.llvm.org/D76572
Diffstat (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/XCOFFObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp index fee4685..b0d772b 100644 --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -31,7 +31,7 @@ static const uint16_t NoRelMask = 0x0001; template <typename T> static Expected<const T *> getObject(MemoryBufferRef M, const void *Ptr, const uint64_t Size = sizeof(T)) { - uintptr_t Addr = uintptr_t(Ptr); + uintptr_t Addr = reinterpret_cast<uintptr_t>(Ptr); if (Error E = Binary::checkOffset(M, Addr, Size)) return std::move(E); return reinterpret_cast<const T *>(Addr); @@ -283,7 +283,7 @@ XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const { const uint8_t * ContentStart = base() + OffsetToRaw; uint64_t SectionSize = getSectionSize(Sec); - if (checkOffset(Data, uintptr_t(ContentStart), SectionSize)) + if (checkOffset(Data, reinterpret_cast<uintptr_t>(ContentStart), SectionSize)) return make_error<BinaryError>(); return makeArrayRef(ContentStart,SectionSize); |