mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
TableGen add warning diagnostic helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -29,6 +29,11 @@ public:
|
|||||||
const std::string &getMessage() const { return Message; }
|
const std::string &getMessage() const { return Message; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void PrintWarning(SMLoc WarningLoc, const Twine &Msg);
|
||||||
|
void PrintWarning(const char *Loc, const Twine &Msg);
|
||||||
|
void PrintWarning(const Twine &Msg);
|
||||||
|
void PrintWarning(const TGError &Warning);
|
||||||
|
|
||||||
void PrintError(SMLoc ErrorLoc, const Twine &Msg);
|
void PrintError(SMLoc ErrorLoc, const Twine &Msg);
|
||||||
void PrintError(const char *Loc, const Twine &Msg);
|
void PrintError(const char *Loc, const Twine &Msg);
|
||||||
void PrintError(const Twine &Msg);
|
void PrintError(const Twine &Msg);
|
||||||
|
@ -20,6 +20,22 @@ namespace llvm {
|
|||||||
|
|
||||||
SourceMgr SrcMgr;
|
SourceMgr SrcMgr;
|
||||||
|
|
||||||
|
void PrintWarning(SMLoc WarningLoc, const Twine &Msg) {
|
||||||
|
SrcMgr.PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrintWarning(const char *Loc, const Twine &Msg) {
|
||||||
|
SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrintWarning(const Twine &Msg) {
|
||||||
|
errs() << "error:" << Msg << "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
void PrintWarning(const TGError &Warning) {
|
||||||
|
PrintWarning(Warning.getLoc(), Warning.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
void PrintError(SMLoc ErrorLoc, const Twine &Msg) {
|
void PrintError(SMLoc ErrorLoc, const Twine &Msg) {
|
||||||
SrcMgr.PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg);
|
SrcMgr.PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user