diff options
Diffstat (limited to 'clang/tools/diagtool/DiagnosticNames.h')
| -rw-r--r-- | clang/tools/diagtool/DiagnosticNames.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/clang/tools/diagtool/DiagnosticNames.h b/clang/tools/diagtool/DiagnosticNames.h new file mode 100644 index 00000000000..ac1934aac1c --- /dev/null +++ b/clang/tools/diagtool/DiagnosticNames.h @@ -0,0 +1,28 @@ +//===- DiagnosticNames.h - Defines a table of all builtin diagnostics ------==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/DataTypes.h" + +namespace diagtool { + struct DiagnosticRecord { + const char *NameStr; + unsigned short DiagID; + uint8_t NameLen; + + llvm::StringRef getName() const { + return llvm::StringRef(NameStr, NameLen); + } + }; + + extern const DiagnosticRecord BuiltinDiagnostics[]; + extern const size_t BuiltinDiagnosticsCount; + +} // end namespace diagtool + |

