diff options
author | Hans Wennborg <hans@hanshq.net> | 2013-09-12 18:23:34 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2013-09-12 18:23:34 +0000 |
commit | fc3389701ead32709ba84825e4c06651065da2c0 (patch) | |
tree | 94cd74b9a557a1d8df873a9053d7083ce55dd512 /examples | |
parent | 17e95c8aac18cac3e040079a120b4a129975ae9d (diff) |
Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.
This moves the code to Job.cpp, which seems like a more natural fit,
and replaces the "is this a JobList? is this a Command?" logic with
a virtual function call.
It also removes the code duplication between PrintJob and
PrintDiagnosticJob and simplifies the code a little.
There's no functionality change here, except that the Executable is
now always printed within quotes, whereas it would previously not be
quoted in crash reports, which I think was a bug.
Differential Revision: http://llvm-reviews.chandlerc.com/D1653
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190620 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/clang-interpreter/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/clang-interpreter/main.cpp b/examples/clang-interpreter/main.cpp index 4c4ace8665..e00583d1a1 100644 --- a/examples/clang-interpreter/main.cpp +++ b/examples/clang-interpreter/main.cpp @@ -95,7 +95,7 @@ int main(int argc, const char **argv, char * const *envp) { if (Jobs.size() != 1 || !isa<driver::Command>(*Jobs.begin())) { SmallString<256> Msg; llvm::raw_svector_ostream OS(Msg); - C->PrintJob(OS, C->getJobs(), "; ", true); + Jobs.Print(OS, "; ", true); Diags.Report(diag::err_fe_expected_compiler_job) << OS.str(); return 1; } @@ -118,7 +118,7 @@ int main(int argc, const char **argv, char * const *envp) { // Show the invocation, with -v. if (CI->getHeaderSearchOpts().Verbose) { llvm::errs() << "clang invocation:\n"; - C->PrintJob(llvm::errs(), C->getJobs(), "\n", true); + Jobs.Print(llvm::errs(), "\n", true); llvm::errs() << "\n"; } |