summaryrefslogtreecommitdiff
path: root/tools/diagtool/DiagnosticNames.h
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-06-04 16:57:50 +0000
committerJordan Rose <jordan_rose@apple.com>2012-06-04 16:57:50 +0000
commit0832f82f763185767d63ae4bf05021c5630c155f (patch)
tree20e3970cb2e7d660bb11d886c7ec201d8c4a542a /tools/diagtool/DiagnosticNames.h
parent837386287f1527c3a1e7ac2ea330c714519ae33a (diff)
downloadclang-0832f82f763185767d63ae4bf05021c5630c155f.tar.gz
clang-0832f82f763185767d63ae4bf05021c5630c155f.tar.bz2
clang-0832f82f763185767d63ae4bf05021c5630c155f.tar.xz
[diagtool] Re-add show-enabled, minimizing the code pulled in from Frontend.
Now correctly builds with both GNU make and CMake. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/diagtool/DiagnosticNames.h')
-rw-r--r--tools/diagtool/DiagnosticNames.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/diagtool/DiagnosticNames.h b/tools/diagtool/DiagnosticNames.h
new file mode 100644
index 0000000000..ac1934aac1
--- /dev/null
+++ b/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
+