Error.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. //
  10. // This file contains error handling helper routines to pretty-print diagnostic
  11. // messages from tblgen.
  12. //
  13. //===----------------------------------------------------------------------===//
  14. #ifndef LLVM_TABLEGEN_ERROR_H
  15. #define LLVM_TABLEGEN_ERROR_H
  16. #include "llvm/Support/SourceMgr.h"
  17. namespace llvm {
  18. void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
  19. void PrintWarning(const char *Loc, const Twine &Msg);
  20. void PrintWarning(const Twine &Msg);
  21. void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
  22. void PrintError(const char *Loc, const Twine &Msg);
  23. void PrintError(const Twine &Msg);
  24. LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const Twine &Msg);
  25. LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
  26. const Twine &Msg);
  27. extern SourceMgr SrcMgr;
  28. extern unsigned ErrorsPrinted;
  29. } // end namespace "llvm"
  30. #endif