Skip to content

Commit 71e8f86

Browse files
committed
LLVMPasses: mark the dump as debug code
This limits the dumping of the variables to the debug build since `llvm::Value::dump` is only available in debug builds of LLVM.
1 parent ff1398e commit 71e8f86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/LLVMPasses/LLVMMergeFunctions.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,8 @@ bool SwiftMergeFunctions::doSanityCheck(std::vector<WeakTrackingVH> &Worklist) {
462462
if (Res1 != -Res2) {
463463
dbgs() << "MERGEFUNC-SANITY: Non-symmetric; triple: " << TripleNumber
464464
<< "\n";
465-
F1->dump();
466-
F2->dump();
465+
LLVM_DEBUG(F1->dump());
466+
LLVM_DEBUG(F2->dump());
467467
Valid = false;
468468
}
469469

@@ -500,9 +500,9 @@ bool SwiftMergeFunctions::doSanityCheck(std::vector<WeakTrackingVH> &Worklist) {
500500
<< TripleNumber << "\n";
501501
dbgs() << "Res1, Res3, Res4: " << Res1 << ", " << Res3 << ", "
502502
<< Res4 << "\n";
503-
F1->dump();
504-
F2->dump();
505-
F3->dump();
503+
LLVM_DEBUG(F1->dump());
504+
LLVM_DEBUG(F2->dump());
505+
LLVM_DEBUG(F3->dump());
506506
Valid = false;
507507
}
508508
}

0 commit comments

Comments
 (0)