Simply use the 'LangOpts' member already present in TextDiagnosticPrinter.

Sorry for the confusion!

llvm-svn: 90664
This commit is contained in:
Steve Naroff 2009-12-05 12:23:07 +00:00
parent 4053e5db54
commit c275f70bf9
4 changed files with 1 additions and 10 deletions

View File

@ -182,7 +182,6 @@ private:
bool SuppressAllDiagnostics; // Suppress all diagnostics.
ExtensionHandling ExtBehavior; // Map extensions onto warnings or errors?
DiagnosticClient *Client;
LangOptions *LangOpts;
/// DiagMappings - Mapping information for diagnostics. Mapping info is
/// packed into four bits per diagnostic. The low three bits are the mapping
@ -239,9 +238,6 @@ public:
DiagnosticClient *getClient() { return Client; }
const DiagnosticClient *getClient() const { return Client; }
LangOptions *getLangOpts() const { return LangOpts; }
void setLangOpts(LangOptions *LOpts) { LangOpts = LOpts; }
/// pushMappings - Copies the current DiagMappings and pushes the new copy
/// onto the top of the stack.
void pushMappings();

View File

@ -210,7 +210,6 @@ Diagnostic::Diagnostic(DiagnosticClient *client) : Client(client) {
ErrorOccurred = false;
FatalErrorOccurred = false;
NumDiagnostics = 0;
LangOpts = 0;
NumErrors = 0;
CustomDiagInfo = 0;

View File

@ -655,9 +655,7 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level,
OS.changeColor(savedColor, true);
// Emit a Visual Studio compatible line number syntax.
// This check is a bit paranoid (in case LangOpts isn't set).
if (Info.getDiags() && Info.getDiags()->getLangOpts() &&
Info.getDiags()->getLangOpts()->Microsoft) {
if (LangOpts && LangOpts->Microsoft) {
OS << PLoc.getFilename() << '(' << LineNo << ')';
OS << " : ";
} else {

View File

@ -236,8 +236,6 @@ int main(int argc, char **argv) {
Clang.createDiagnostics(argc, argv);
if (!Clang.hasDiagnostics())
return 1;
Clang.getDiagnostics().setLangOpts(&Clang.getLangOpts());
// Set an error handler, so that any LLVM backend diagnostics go through our
// error handler.