[PATCH] Refactor Compilation::PrintJob and PrintDiagnosticJob into Job::Print

Hans Wennborg hans at chromium.org
Wed Sep 11 16:54:28 PDT 2013


Hi rnk,

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.

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.

http://llvm-reviews.chandlerc.com/D1653

Files:
  examples/clang-interpreter/main.cpp
  include/clang/Driver/Compilation.h
  include/clang/Driver/Job.h
  lib/Driver/Compilation.cpp
  lib/Driver/Driver.cpp
  lib/Driver/Job.cpp
  lib/Frontend/CreateInvocationFromCommandLine.cpp
  lib/Tooling/Tooling.cpp
  test/Driver/crash-report.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1653.1.patch
Type: text/x-patch
Size: 15402 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130911/065e0dc6/attachment.bin>


More information about the cfe-commits mailing list