From c574acfe9526923ace72653922cdcda54eb0541e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 5 Nov 2015 06:24:09 +0000 Subject: [PATCH] RuntimeDyld: fix -Wtype-limits Adjust the casted type. By casting to the same size rather than just the signed-ness, we were asserting tautological statements. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252150 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h index ddf59693fa1..f593c9ab15d 100644 --- a/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h +++ b/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h @@ -161,9 +161,9 @@ public: } case COFF::IMAGE_REL_I386_SECTION: // 16-bit section index of the section that contains the target. - assert(static_cast(RE.SectionID) <= INT16_MAX && + assert(static_cast(RE.SectionID) <= INT16_MAX && "relocation overflow"); - assert(static_cast(RE.SectionID) >= INT16_MIN && + assert(static_cast(RE.SectionID) >= INT16_MIN && "relocation underflow"); DEBUG(dbgs() << "\t\tOffset: " << RE.Offset << " RelType: IMAGE_REL_I386_SECTION Value: " << RE.SectionID -- 2.34.1