DiagnosticNames.h revision f11b0f9a4e8d79f1bf59f4271f96d28b55bcc067
1//===- DiagnosticNames.h - Defines a table of all builtin diagnostics ------==//
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#include "llvm/ADT/StringRef.h"
11#include "llvm/Support/DataTypes.h"
12
13namespace diagtool {
14  struct DiagnosticRecord {
15    const char *NameStr;
16    unsigned short DiagID;
17    uint8_t NameLen;
18
19    llvm::StringRef getName() const {
20      return llvm::StringRef(NameStr, NameLen);
21    }
22  };
23
24  extern const DiagnosticRecord BuiltinDiagnostics[];
25  extern const size_t BuiltinDiagnosticsCount;
26
27} // end namespace diagtool
28
29