From 38c59b9f53f0cb0af93c2861a9c7c5564c4b0cf7 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 18 Sep 2023 17:20:57 +0200 Subject: Revert "Reapply [Verifier] Sanity check alloca size against DILocalVariable fragment size" This reverts commit 47324cfd7d8ca1a2a5cbb9f948ecff66a28ee6bc. This exposed incorrect debuginfo in rustc. Revert the verification until this has been fixed. --- llvm/lib/IR/Verifier.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'llvm/lib/IR/Verifier.cpp') diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 9ce0ef5..10d1763 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -6298,20 +6298,6 @@ void Verifier::visitDbgIntrinsic(StringRef Kind, DbgVariableIntrinsic &DII) { CheckDI(isType(Var->getRawType()), "invalid type ref", Var, Var->getRawType()); verifyFnArgs(DII); - - if (auto *Declare = dyn_cast(&DII)) { - if (auto *Alloca = dyn_cast_or_null(Declare->getAddress())) { - DIExpression *Expr = Declare->getExpression(); - std::optional FragSize = Declare->getFragmentSizeInBits(); - std::optional AllocSize = Alloca->getAllocationSizeInBits(DL); - if (FragSize && AllocSize && !AllocSize->isScalable() && - !Expr->isComplex()) { - CheckDI(*FragSize <= AllocSize->getFixedValue(), - "llvm.dbg.declare has larger fragment size than alloca size ", - &DII); - } - } - } } void Verifier::visitDbgLabelIntrinsic(StringRef Kind, DbgLabelInst &DLI) { -- cgit v1.1