swift-module-digester: refactor the ABI/API diagnostics to use DiagnosticEngine. NFC (#18957)

Before this patch, we used to define tooling-specific diagnostics. With adding more
checking logics, we found this mechanism hard to extend. This patch
eliminates the home-made diagnostics model to use the one from compiler, which provides
several benefits: less boiler-templates, better integration with DiagnosticConsumer,
and easy ordering of detected issues.
This commit is contained in:
Xi Ge
2018-08-24 13:11:32 -07:00
committed by GitHub
parent 574b7f45be
commit e4388af6be
15 changed files with 349 additions and 290 deletions

View File

@@ -60,6 +60,11 @@ raw_ostream &operator<<(raw_ostream &Out, const NodeAnnotation Value);
// Redefine << so that we can output the name of the node kind.
raw_ostream &operator<<(raw_ostream &Out, const SDKNodeKind Value);
StringRef getDeclKindStr(const DeclKind Value);
// Redefine << so that we can output the name of decl kind.
raw_ostream &operator<<(raw_ostream &Out, const DeclKind Value);
struct APIDiffItem {
virtual void streamDef(llvm::raw_ostream &S) const = 0;
virtual APIDiffItemKind getKind() const = 0;