Skip to content

Commit ecd52a5

Browse files
committed
[Verifier] Try to fix MSVC build
Some buildbots fail with: > C:\a\llvm-clang-x86_64-expensive-checks-win\llvm-project\llvm\lib\IR\Verifier.cpp(4352): error C2678: binary '==': no operator found which takes a left-hand operand of type 'const llvm::MDOperand' (or there is no acceptable conversion) Possibly the explicit MDOperand to Metadata* conversion will help?
1 parent f3cfec9 commit ecd52a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4349,7 +4349,7 @@ void Verifier::visitAliasScopeMetadata(const MDNode *MD) {
43494349
unsigned NumOps = MD->getNumOperands();
43504350
Assert(NumOps >= 2 && NumOps <= 3, "scope must have two or three operands",
43514351
MD);
4352-
Assert(MD->getOperand(0) == MD || isa<MDString>(MD->getOperand(0)),
4352+
Assert(MD->getOperand(0).get() == MD || isa<MDString>(MD->getOperand(0)),
43534353
"first scope operand must be self-referential or string", MD);
43544354
if (NumOps == 3)
43554355
Assert(isa<MDString>(MD->getOperand(2)),
@@ -4361,7 +4361,7 @@ void Verifier::visitAliasScopeMetadata(const MDNode *MD) {
43614361
unsigned NumDomainOps = Domain->getNumOperands();
43624362
Assert(NumDomainOps >= 1 && NumDomainOps <= 2,
43634363
"domain must have one or two operands", Domain);
4364-
Assert(Domain->getOperand(0) == Domain ||
4364+
Assert(Domain->getOperand(0).get() == Domain ||
43654365
isa<MDString>(Domain->getOperand(0)),
43664366
"first domain operand must be self-referential or string", Domain);
43674367
if (NumDomainOps == 2)

0 commit comments

Comments
 (0)