forked from OSchip/llvm-project
parent
ded7fa4439
commit
57b469f842
|
@ -180,6 +180,8 @@ public:
|
|||
/// @return true, if we store at least one error.
|
||||
bool hasErrors() const { return size() > 0; }
|
||||
|
||||
void print(raw_ostream &OS, int level = 0) const;
|
||||
|
||||
const Region *region() const { return R; }
|
||||
void report(RejectReasonPtr Reject) { ErrorReports.push_back(Reject); }
|
||||
};
|
||||
|
|
|
@ -149,6 +149,13 @@ const llvm::DebugLoc &RejectReason::getDebugLoc() const {
|
|||
return Unknown;
|
||||
}
|
||||
|
||||
// RejectLog.
|
||||
void RejectLog::print(raw_ostream &OS, int level) const {
|
||||
int j = 0;
|
||||
for (auto Reason : ErrorReports)
|
||||
OS.indent(level) << "[" << j++ << "] " << Reason->getMessage() << "\n";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// ReportCFG.
|
||||
|
||||
|
|
Loading…
Reference in New Issue