From 543760218a653b0b0df2d80d33529a3f5ccb9eb4 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Sat, 1 Apr 2017 19:37:15 +0000 Subject: [PATCH] [WASM] Remove an assertion that can never fire. uint* is by definition always >=0. llvm-svn: 299311 --- llvm/lib/Object/WasmObjectFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Object/WasmObjectFile.cpp b/llvm/lib/Object/WasmObjectFile.cpp index beb99a1ed5bd..18c535a3abda 100644 --- a/llvm/lib/Object/WasmObjectFile.cpp +++ b/llvm/lib/Object/WasmObjectFile.cpp @@ -100,7 +100,7 @@ static int8_t readVarint7(const uint8_t *&Ptr) { static uint8_t readVaruint7(const uint8_t *&Ptr) { uint64_t result = readULEB128(Ptr); - assert(result <= VARUINT7_MAX && result >= 0); + assert(result <= VARUINT7_MAX); return result; } @@ -112,7 +112,7 @@ static int32_t readVarint32(const uint8_t *&Ptr) { static uint32_t readVaruint32(const uint8_t *&Ptr) { uint64_t result = readULEB128(Ptr); - assert(result <= UINT32_MAX && result >= 0); + assert(result <= UINT32_MAX); return result; }