From 22cf54a7fba670642c121684ac3c7ff7e35dfa5c Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sun, 22 Mar 2020 22:20:04 -0400 Subject: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. NFC. Differential Revision: https://reviews.llvm.org/D76572 --- llvm/lib/Object/XCOFFObjectFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Object/XCOFFObjectFile.cpp') 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 static Expected getObject(MemoryBufferRef M, const void *Ptr, const uint64_t Size = sizeof(T)) { - uintptr_t Addr = uintptr_t(Ptr); + uintptr_t Addr = reinterpret_cast(Ptr); if (Error E = Binary::checkOffset(M, Addr, Size)) return std::move(E); return reinterpret_cast(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(ContentStart), SectionSize)) return make_error(); return makeArrayRef(ContentStart,SectionSize); -- cgit v1.1