summaryrefslogtreecommitdiffstats
path: root/clang/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang')
-rw-r--r--clang/include/clang/Basic/Diagnostic.h3
-rw-r--r--clang/include/clang/Basic/DiagnosticDriverKinds.td8
-rw-r--r--clang/include/clang/Basic/DiagnosticFrontendKinds.def20
-rw-r--r--clang/include/clang/Basic/DiagnosticFrontendKinds.td15
-rw-r--r--clang/include/clang/Frontend/FrontendDiagnostic.h27
5 files changed, 68 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h
index f504cad29fe..bcec5d9334b 100644
--- a/clang/include/clang/Basic/Diagnostic.h
+++ b/clang/include/clang/Basic/Diagnostic.h
@@ -33,7 +33,8 @@ namespace clang {
// Start position for diagnostics.
enum {
DIAG_START_DRIVER = 300,
- DIAG_START_LEX = DIAG_START_DRIVER + 100,
+ DIAG_START_FRONTEND = DIAG_START_DRIVER + 100,
+ DIAG_START_LEX = DIAG_START_FRONTEND + 100,
DIAG_START_PARSE = DIAG_START_LEX + 300,
DIAG_START_AST = DIAG_START_PARSE + 300,
DIAG_START_SEMA = DIAG_START_AST + 100,
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td
index f84c79772d2..6301b6fb32f 100644
--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td
+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td
@@ -9,10 +9,10 @@
let Component = "Driver" in {
-def driver_no_such_file : Error<"no such file or directory: '%0'">
-def driver_unsupported_opt : Error<"unsupported option '%0'">
-def driver_unknown_stdin_type : Error<
+def err_drv_no_such_file : Error<"no such file or directory: '%0'">
+def err_drv_unsupported_opt : Error<"unsupported option '%0'">
+def err_drv_unknown_stdin_type : Error<
"-E or -x required when input is from standard input">
-def driver_unknown_language : Error<"language not recognized: '%0'">
+def err_drv_unknown_language : Error<"language not recognized: '%0'">
}
diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.def b/clang/include/clang/Basic/DiagnosticFrontendKinds.def
new file mode 100644
index 00000000000..42080fe2d09
--- /dev/null
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.def
@@ -0,0 +1,20 @@
+//==--- DiagnosticFrontendKinds.def - frontend diagnostics ------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifdef FRONTENDSTART
+__FRONTENDSTART = DIAG_START_FRONTEND,
+#undef FRONTENDSTART
+#endif
+
+DIAG(err_fe_unknown_triple, ERROR,
+ "unknown target triple '%0', please use -triple or -arch")
+DIAG(err_fe_error_reading, ERROR,
+ "error reading '%0'")
+DIAG(err_fe_error_reading_stdin, ERROR,
+ "error reading stdin")
diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
new file mode 100644
index 00000000000..2ab57397878
--- /dev/null
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -0,0 +1,15 @@
+//==--- DiagnosticFrontendKinds.td - frontend diagnostics -----------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+let Component = "Frontend" in {
+
+def err_fe_error_reading, Error< "error reading '%0'">
+def err_fe_error_reading_stdin : Error<"error reading stdin">
+
+}
diff --git a/clang/include/clang/Frontend/FrontendDiagnostic.h b/clang/include/clang/Frontend/FrontendDiagnostic.h
new file mode 100644
index 00000000000..7c875985034
--- /dev/null
+++ b/clang/include/clang/Frontend/FrontendDiagnostic.h
@@ -0,0 +1,27 @@
+//===--- DiagnosticFrontend.h - Diagnostics for frontend --------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_FRONTENDDIAGNOSTIC_H
+#define LLVM_CLANG_FRONTENDDIAGNOSTIC_H
+
+#include "clang/Basic/Diagnostic.h"
+
+namespace clang {
+ namespace diag {
+ enum {
+#define DIAG(ENUM,FLAGS,DESC) ENUM,
+#define FRONTENDSTART
+#include "clang/Basic/DiagnosticFrontendKinds.def"
+#undef DIAG
+ NUM_BUILTIN_FRONTEND_DIAGNOSTICS
+ };
+ } // end namespace diag
+} // end namespace clang
+
+#endif
OpenPOWER on IntegriCloud