From 19c11d6c733cdb711f9a08616e100b9bd3c5b2ef Mon Sep 17 00:00:00 2001 From: Peter Goodman Date: Wed, 17 Feb 2021 19:40:27 -0500 Subject: [PATCH] Remove an overly strict DCHECK_LE that actually isn't necessary, as the subsequent code is sufficiently defensive. (#485) --- lib/BC/Util.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/BC/Util.cpp b/lib/BC/Util.cpp index 3b547d74d..9d29120cc 100644 --- a/lib/BC/Util.cpp +++ b/lib/BC/Util.cpp @@ -2000,7 +2000,6 @@ llvm::Value *BuildPointerToOffset(llvm::IRBuilder<> &ir, llvm::Value *ptr, if (const auto diff = dest_elem_offset - reached_disp; diff) { DCHECK_LT(diff, dest_elem_offset); - DCHECK_LE(diff, dl.getTypeAllocSize(indexed_type)); const auto i8_type = llvm::Type::getInt8Ty(context); const auto i8_ptr_type = llvm::PointerType::getInt8PtrTy(context, ptr_addr_space);