aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-12-05 12:23:07 +0000
committerSteve Naroff <snaroff@apple.com>2009-12-05 12:23:07 +0000
commit0304c6cb7fd3b2137213858b1e5ae85ef3f4f8e2 (patch)
treea43fbe16770aef7f8dc484ea5c4c6713c13247d5
parent0e7049fc6f2cc13d1236630782b702f11f6aaf9f (diff)
Remove 'LangOpts' from Diagnostic (added in http://llvm.org/viewvc/llvm-project?view=rev&revision=90642).
Simply use the 'LangOpts' member already present in TextDiagnosticPrinter. Sorry for the confusion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90664 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/Diagnostic.h4
-rw-r--r--lib/Basic/Diagnostic.cpp1
-rw-r--r--lib/Frontend/TextDiagnosticPrinter.cpp4
-rw-r--r--tools/clang-cc/clang-cc.cpp2
4 files changed, 1 insertions, 10 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h
index b9d19674af..b2523f28d5 100644
--- a/include/clang/Basic/Diagnostic.h
+++ b/include/clang/Basic/Diagnostic.h
@@ -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();
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 1f5179146b..8d0d81326d 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -210,7 +210,6 @@ Diagnostic::Diagnostic(DiagnosticClient *client) : Client(client) {
ErrorOccurred = false;
FatalErrorOccurred = false;
NumDiagnostics = 0;
- LangOpts = 0;
NumErrors = 0;
CustomDiagInfo = 0;
diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp
index eeca97d62a..f8bb21ddee 100644
--- a/lib/Frontend/TextDiagnosticPrinter.cpp
+++ b/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -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 {
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index fbc2847a92..11a4f24273 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -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.