[llvm] 6716ce8 - Revert "Verifier: Add check for DICompositeType elements being null"
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 11:36:46 PST 2025
Author: David Blaikie
Date: 2025-01-17T19:36:35Z
New Revision: 6716ce8b641f0e42e2343e1694ee578b027be0c4
URL: https://github.com/llvm/llvm-project/commit/6716ce8b641f0e42e2343e1694ee578b027be0c4
DIFF: https://github.com/llvm/llvm-project/commit/6716ce8b641f0e42e2343e1694ee578b027be0c4.diff
LOG: Revert "Verifier: Add check for DICompositeType elements being null"
Asserts on various tests/buildbots, at least one example is
DebugInfo/X86/set.ll
This reverts commit 2dc5682dacab2dbb52a771746fdede0e938fc6e9.
Added:
Modified:
llvm/lib/IR/Verifier.cpp
Removed:
llvm/test/Verifier/dicompositetype-elements-null.ll
################################################################################
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 00280dbe5300b2..7b6f7b5aa6171a 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -1319,8 +1319,6 @@ void Verifier::visitDICompositeType(const DICompositeType &N) {
unsigned DIBlockByRefStruct = 1 << 4;
CheckDI((N.getFlags() & DIBlockByRefStruct) == 0,
"DIBlockByRefStruct on DICompositeType is no longer supported", &N);
- CheckDI(llvm::all_of(N.getElements(), [](const DINode *N) { return N; }),
- "DISubprogram contains null entry in `elements` field", &N);
if (N.isVector()) {
const DINodeArray Elements = N.getElements();
diff --git a/llvm/test/Verifier/dicompositetype-elements-null.ll b/llvm/test/Verifier/dicompositetype-elements-null.ll
deleted file mode 100644
index c0aca47852bac0..00000000000000
--- a/llvm/test/Verifier/dicompositetype-elements-null.ll
+++ /dev/null
@@ -1,6 +0,0 @@
-; RUN: not opt -S < %s 2>&1 | FileCheck %s
-
-!named = !{!0}
-; CHECK: DISubprogram contains null entry in `elements` field
-!0 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1", elements: !1)
-!1 = !{null}
More information about the llvm-commits
mailing list