Skip to content

Commit

Permalink
[IR] Remove unused variable in Verifier.cpp (NFC)
Browse files Browse the repository at this point in the history
llvm-project/llvm/lib/IR/Verifier.cpp:4854:14:
error: unused variable 'IsLeaf' [-Werror,-Wunused-variable]
  const auto IsLeaf = [](const Metadata *CurMD) {
             ^
1 error generated.
  • Loading branch information
DamonFool committed Apr 24, 2024
1 parent cf328ff commit 806db47
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions llvm/lib/IR/Verifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4851,13 +4851,6 @@ void Verifier::visitMMRAMetadata(Instruction &I, MDNode *MD) {
Check(canInstructionHaveMMRAs(I),
"!mmra metadata attached to unexpected instruction kind", I, MD);

const auto IsLeaf = [](const Metadata *CurMD) {
const MDNode *Tuple = dyn_cast<MDTuple>(CurMD);
return Tuple && Tuple->getNumOperands() == 2 &&
isa<MDString>(Tuple->getOperand(0)) &&
isa<MDString>(Tuple->getOperand(1));
};

// MMRA Metadata should either be a tag, e.g. !{!"foo", !"bar"}, or a
// list of tags such as !2 in the following example:
// !0 = !{!"a", !"b"}
Expand Down

0 comments on commit 806db47

Please sign in to comment.