summaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-05-08 08:00:09 +0200
committerGitHub <noreply@github.com>2025-05-08 08:00:09 +0200
commit9383fb23e18bb983d0024fb956a0a724ef9eb03d (patch)
treea2e386872c09368abfce4229ed6820e519b29058 /llvm/lib/AsmParser/LLParser.cpp
parent334c1abdb0bee488477f810ebf4cc1d41c31e653 (diff)
Reapply "IR: Remove uselist for constantdata (#137313)" (#138961)
Reapply "IR: Remove uselist for constantdata (#137313)" This reverts commit 5936c02c8b9c6d1476f7830517781ce8b6e26e75. Fix checking uselists of constants in assume bundle queries
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index fc7f4601331d..96f86eb52f15 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -8869,6 +8869,8 @@ bool LLParser::parseMDNodeVector(SmallVectorImpl<Metadata *> &Elts) {
//===----------------------------------------------------------------------===//
bool LLParser::sortUseListOrder(Value *V, ArrayRef<unsigned> Indexes,
SMLoc Loc) {
+ if (!V->hasUseList())
+ return false;
if (V->use_empty())
return error(Loc, "value has no uses");