diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-10-11 22:02:06 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-10-11 22:02:06 +0000 |
| commit | 4e0f15a4a247abfcc53563815ce799d2ad45c786 (patch) | |
| tree | 5a2f800be5b5e6ad6f7a679de3c14e28f425343e /clang/lib/Frontend/CompilerInstance.cpp | |
| parent | d42340ecfdcd378f4e6c5f8968a7e5c194b10d6b (diff) | |
| download | llvm-4e0f15a4a247abfcc53563815ce799d2ad45c786.zip llvm-4e0f15a4a247abfcc53563815ce799d2ad45c786.tar.gz llvm-4e0f15a4a247abfcc53563815ce799d2ad45c786.tar.bz2 | |
Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.
llvm-svn: 116250
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
| -rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 9397663..44e5fd2 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -90,24 +90,6 @@ void CompilerInstance::setCodeCompletionConsumer(CodeCompleteConsumer *Value) { } // Diagnostics -namespace { - class BinaryDiagnosticSerializer : public DiagnosticClient { - llvm::raw_ostream &OS; - SourceManager *SourceMgr; - public: - explicit BinaryDiagnosticSerializer(llvm::raw_ostream &OS) - : OS(OS), SourceMgr(0) { } - - virtual void HandleDiagnostic(Diagnostic::Level DiagLevel, - const DiagnosticInfo &Info); - }; -} - -void BinaryDiagnosticSerializer::HandleDiagnostic(Diagnostic::Level DiagLevel, - const DiagnosticInfo &Info) { - StoredDiagnostic(DiagLevel, Info).Serialize(OS); -} - static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts, unsigned argc, const char* const *argv, Diagnostic &Diags) { @@ -143,21 +125,7 @@ CompilerInstance::createDiagnostics(const DiagnosticOptions &Opts, // Create the diagnostic client for reporting errors or for // implementing -verify. llvm::OwningPtr<DiagnosticClient> DiagClient; - if (Opts.BinaryOutput) { - if (llvm::sys::Program::ChangeStderrToBinary()) { - // We weren't able to set standard error to binary, which is a - // bit of a problem. So, just create a text diagnostic printer - // to complain about this problem, and pretend that the user - // didn't try to use binary output. - Diags->setClient(new TextDiagnosticPrinter(llvm::errs(), Opts)); - Diags->Report(diag::err_fe_stderr_binary); - return Diags; - } else { - Diags->setClient(new BinaryDiagnosticSerializer(llvm::errs())); - } - } else { - Diags->setClient(new TextDiagnosticPrinter(llvm::errs(), Opts)); - } + Diags->setClient(new TextDiagnosticPrinter(llvm::errs(), Opts)); // Chain in -verify checker, if requested. if (Opts.VerifyDiagnostics) |
