Skip to content

Commit

Permalink
The verifier should only output to llvm::errs()
Browse files Browse the repository at this point in the history
  • Loading branch information
atrick committed Oct 16, 2020
1 parent d279012 commit 69ca2c6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/SILOptimizer/UtilityPasses/AccessPathVerification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ class AccessPathVerification : public SILModuleTransform {
if (collectedFromPath != accessPath) {
llvm::errs() << "Address use: " << *operand->getUser()
<< " collected from path\n ";
collectedFromPath.dump();
collectedFromPath.print(llvm::errs());
llvm::errs() << " has different path\n ";
accessPath.dump();
operand->getUser()->getFunction()->dump();
accessPath.print(llvm::errs());
operand->getUser()->getFunction()->print(llvm::errs());
assert(false && "computed path does not match collected path");
}
return;
Expand All @@ -81,19 +81,19 @@ class AccessPathVerification : public SILModuleTransform {
if (!iterAndInserted.second) {
llvm::errs() << "Address use: " << *operand->getUser()
<< " with path...\n";
accessPath.dump();
accessPath.print(llvm::errs());
llvm::errs() << " was not collected for: " << *use->getUser();
llvm::errs() << " with path...\n";
auto computedPath = iterAndInserted.first->second;
computedPath.dump();
use->getUser()->getFunction()->dump();
computedPath.print(llvm::errs());
use->getUser()->getFunction()->print(llvm::errs());
assert(false && "missing collected use");
}
}
if (!foundOperandUse && !accessPath.hasUnknownOffset()) {
llvm::errs() << "Address use: " << *operand->getUser()
<< " is not a use of path\n ";
accessPath.dump();
accessPath.print(llvm::errs());
assert(false && "not a user of its own computed path ");
}
uses.clear();
Expand Down

0 comments on commit 69ca2c6

Please sign in to comment.