Use the DiagnosticHandler to print diagnostics when reading bitcode.
[oota-llvm.git] / include / llvm / IR / DiagnosticInfo.h
index b592f890b22d4c7a57d20d290b2957995dbcd900..c6a8854e077482f397e459acc34c6aa513e788ce 100644 (file)
@@ -45,6 +45,7 @@ enum DiagnosticSeverity {
 /// \brief Defines the different supported kind of a diagnostic.
 /// This enum should be extended with a new ID for each added concrete subclass.
 enum DiagnosticKind {
+  DK_Bitcode,
   DK_InlineAsm,
   DK_StackSize,
   DK_Linker,
@@ -97,6 +98,8 @@ public:
   virtual void print(DiagnosticPrinter &DP) const = 0;
 };
 
+typedef std::function<void(const DiagnosticInfo &)> DiagnosticHandlerFunction;
+
 /// Diagnostic information for inline asm reporting.
 /// This is basically a message and an optional location.
 class DiagnosticInfoInlineAsm : public DiagnosticInfo {