-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Diagnostic files for Frontend and move a couple errors over.
- Notably, clang now exits with an error if it can't find a file. This flushed out a bug in the CGColorSpace.c test case. :) llvm-svn: 66789
- Loading branch information
Showing
8 changed files
with
92 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"> | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters