Remove an overly strict DCHECK_LE that actually isn't necessary, as the subsequent code is sufficiently defensive. (#485)

This commit is contained in:
Peter Goodman
2021-02-17 19:40:27 -05:00
committed by GitHub
parent 74c94901b2
commit 19c11d6c73
-1
View File
@@ -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);