[ScopDetectionDiagnostic] Add meaningfull enduser message for regions with entry block
Before this change the user only saw "Unspecified Error", when a region contained the entry block. Now we report: "Scop contains function entry (not yet supported)." llvm-svn: 293169
This commit is contained in:
parent
6f4ed077d0
commit
77363965c0
|
@ -702,6 +702,7 @@ public:
|
|||
/// @name RejectReason interface
|
||||
//@{
|
||||
virtual std::string getMessage() const override;
|
||||
virtual std::string getEndUserMessage() const override;
|
||||
virtual const DebugLoc &getDebugLoc() const override;
|
||||
//@}
|
||||
};
|
||||
|
|
|
@ -549,6 +549,10 @@ std::string ReportEntry::getMessage() const {
|
|||
return "Region containing entry block of function is invalid!";
|
||||
}
|
||||
|
||||
std::string ReportEntry::getEndUserMessage() const {
|
||||
return "Scop contains function entry (not yet supported).";
|
||||
}
|
||||
|
||||
const DebugLoc &ReportEntry::getDebugLoc() const {
|
||||
return BB->getTerminator()->getDebugLoc();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue