Commit Graph

20 Commits

Author SHA1 Message Date
Rafael Espindola cbbe1d4454 Use -Xclang to pass -internal-isystem and -internal-externc-isystem to -cc1.
They are cc1 options only, so the driver was ignoring them.

llvm-svn: 191379
2013-09-25 15:47:05 +00:00
Hans Wennborg b212b34f19 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

llvm-svn: 190620
2013-09-12 18:23:34 +00:00
Larisse Voufo 4154f46c5a Fixing commit r187768: Moved diagnosis of forward declarations of variable templates from Parser to Sema.
llvm-svn: 187770
2013-08-06 03:57:41 +00:00
Larisse Voufo 21de36ba66 Moved diagnosis of forward declarations of variable templates from Parser to Sema.
llvm-svn: 187768
2013-08-06 03:43:07 +00:00
NAKAMURA Takumi cecdabb0bf clang/test/Driver/crash-report.c: Mark it as XFAIL:mingw32, for now. Investigating.
I met a message, "fatal error: file 'nul' modified since it was first processed".

llvm-svn: 187767
2013-08-06 03:31:55 +00:00
Rafael Espindola 5c6c707e53 Require a shell for this test.
Some versions of python will expand the glob used in the test, others wont,
causing the test to fail when run with LIT_USE_INTERNAL_SHELL=1.

llvm-svn: 185653
2013-07-04 16:23:44 +00:00
Rafael Espindola 925213b0fa Add 'not' to commands that are expected to fail.
This is at least good documentation, but also opens the possibility of
using pipefail.

llvm-svn: 185652
2013-07-04 16:16:58 +00:00
Richard Smith 940a6d73ce Produce an actual error before attempting to attach notes to it when bailing out
due to FORCE_CLANG_DIAGNOSTICS_CRASH=1. Also add a test for that env var.

llvm-svn: 171074
2012-12-25 21:56:27 +00:00
Chad Rosier 83f16bf445 [driver] Completely rework how superfluous options are stripped out of the crash
diagnostics script.

This addresses the FIXME pertaining to quoted arguments.  We also delineate
between those flags that have an argument (e.g., -D macro, -MF file) and
those that do not (e.g., -M, -MM, -MG).  Finally, we add the -dwarf-debug-flags
to the list of flags to be removed.
rdar://12329974

llvm-svn: 167152
2012-10-31 18:31:33 +00:00
Chad Rosier ae7581dfd6 [driver crash diagnostics] Strip -internal-isystem and -internal-externc-isystem.
rdar://11949066

llvm-svn: 160752
2012-07-25 18:55:43 +00:00
Chad Rosier 7a42ff546a [driver crash diagnostics] Strip -idirafter, -iprefix, -iwithprefix,
-iwithprefixbefore, and -isystem options, per Matt's suggestion.
rdar://11949066

llvm-svn: 160750
2012-07-25 18:38:57 +00:00
Chad Rosier 959f0b3a07 [driver crash diagnostics] A few enhancements:
-Strip -iquote and -M options.
 -Quote -D options to avoid problems with command line macros that include
  parens.
rdar://11949066

llvm-svn: 160743
2012-07-25 17:52:16 +00:00
NAKAMURA Takumi 878f1445f9 test/Driver/crash-report.c: Remove "REQUIRES: shell". env(1) can be used also with gnuwin32.
llvm-svn: 160362
2012-07-17 12:00:24 +00:00
NAKAMURA Takumi ed5bbe9020 [Win32] Rework crash-report since r145389.
- lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions.
  - test/Driver/crash-report.c: Add REQUIRES:shell for now.
    FIXME: setenv should work also on Lit.InternalShellRunner.
  - test/Driver/crash-report.c: Remove XFAIL.

Thanks to Chad, To point out the issue.

llvm-svn: 160343
2012-07-17 05:09:29 +00:00
NAKAMURA Takumi 78c0295fcf test/Driver/crash-report.c: Small tweaks. 1) Use %t instead %T for TMP. 2) Set all of $TMPDIR, $TEMP and $TMP, or a certain host might set $TEMP.
llvm-svn: 160342
2012-07-17 05:09:20 +00:00
Richard Smith 16830043fa test/Driver/crash-report.c: don't fail if there are no files left behind by a previous run of this test!
llvm-svn: 159615
2012-07-02 23:11:27 +00:00
David Blaikie a6b4db812c Improve crash reporting test coverage.
This adds validation that the
* repro source is only rewrite-includes processed, not fully preprocessed.
* repro script contains macro definitions (-DFOO=BAR).

Based on suggestions/help by Matt Beaumont-Gay.

llvm-svn: 159605
2012-07-02 22:07:20 +00:00
NAKAMURA Takumi 9d0a11d9a1 test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating.
llvm-svn: 159476
2012-06-30 00:29:03 +00:00
David Blaikie 9c9fd7a77b Unbreak the test from r159469.
llvm-svn: 159474
2012-06-29 23:16:06 +00:00
David Blaikie 5d577a225e Use -frewrite-includes for crash reports.
In future changes we should:
* use __builtin_trap rather than derefing 'random' volatile pointers.
* avoid dumping temporary files into /tmp when running tests, instead
  preferring a location that is properly cleaned up by lit.

Review by Chandler Carruth.

llvm-svn: 159469
2012-06-29 22:03:56 +00:00