Index: lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h =================================================================== --- lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h +++ lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h @@ -144,9 +144,9 @@ ? Value : Sections[RE.Sections.SectionA].getLoadAddressWithOffset( RE.Addend); - assert(static_cast(Result) <= INT32_MAX && + assert(static_cast(Result) <= INT32_MAX && "relocation overflow"); - assert(static_cast(Result) >= INT32_MIN && + assert(static_cast(Result) >= INT32_MIN && "relocation underflow"); DEBUG(dbgs() << "\t\tOffset: " << RE.Offset << " RelType: IMAGE_REL_I386_DIR32" @@ -161,9 +161,9 @@ uint64_t Result = Sections[RE.Sections.SectionA].getLoadAddressWithOffset(RE.Addend) - Sections[0].getLoadAddress(); - assert(static_cast(Result) <= INT32_MAX && + assert(static_cast(Result) <= INT32_MAX && "relocation overflow"); - assert(static_cast(Result) >= INT32_MIN && + assert(static_cast(Result) >= INT32_MIN && "relocation underflow"); DEBUG(dbgs() << "\t\tOffset: " << RE.Offset << " RelType: IMAGE_REL_I386_DIR32NB" @@ -178,9 +178,9 @@ ? Value : Sections[RE.Sections.SectionA].getLoadAddress(); Result = Result - Section.getLoadAddress() + RE.Addend - 4 - RE.Offset; - assert(static_cast(Result) <= INT32_MAX && + assert(static_cast(Result) <= INT32_MAX && "relocation overflow"); - assert(static_cast(Result) >= INT32_MIN && + assert(static_cast(Result) >= INT32_MIN && "relocation underflow"); DEBUG(dbgs() << "\t\tOffset: " << RE.Offset << " RelType: IMAGE_REL_I386_REL32" @@ -202,10 +202,8 @@ break; case COFF::IMAGE_REL_I386_SECREL: // 32-bit offset of the target from the beginning of its section. - assert(static_cast(RE.Addend) <= INT32_MAX && - "relocation overflow"); - assert(static_cast(RE.Addend) >= INT32_MIN && - "relocation underflow"); + assert(RE.Addend <= INT32_MAX && "relocation overflow"); + assert(RE.Addend >= INT32_MIN && "relocation underflow"); DEBUG(dbgs() << "\t\tOffset: " << RE.Offset << " RelType: IMAGE_REL_I386_SECREL Value: " << RE.Addend << '\n');