Commit Graph

260 Commits

Author SHA1 Message Date
Lubos Lunak c6b9270d04 strip UTF-8 BOM in -frewrite-includes (PR#15664)
llvm-svn: 195877
2013-11-27 21:14:43 +00:00
Jim Grosbach e2bfac497d ARM: embedded v7 'darwin' doesn't get min-version defines.
Make sure armv7 doesn't get the iOS deployment version definitions when
it's being used for non-iOS.

rdar://15497681

llvm-svn: 195149
2013-11-19 20:18:39 +00:00
Hans Wennborg ff6af8bc21 Remove period at end of "optimization level is unsupported" diagnostic
llvm-svn: 195048
2013-11-18 22:10:17 +00:00
Hans Wennborg be5df46f26 Make test/Driver/clang_f_opts.c not write to the test dir
After r195009, the test would write a .o file to the test dir. Send that to
/dev/null instead. Also fix the typo in test/Frontend/invalid-o-level.c.

llvm-svn: 195047
2013-11-18 21:58:33 +00:00
Sylvestre Ledru 5abf2ec12d Using an invalid -O falls back on -O3 instead of an error
Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
  Expected Passes    : 6721
  Expected Failures  : 20
  Unsupported Tests  : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Differential Revision: http://llvm-reviews.chandlerc.com/D2212

llvm-svn: 195009
2013-11-18 13:23:07 +00:00
Alp Toker b504417b03 Move remaining %clang_cc1 tests out of test/Driver
clang -cc1 skips the driver so it never made sense to include these with the
Driver tests.

Basic type tests and flag tests generally both go in Frontend.

Now that the final -cc1 tests have been moved out of test/Driver, add a
local substitution to enforce and detect future mistakes.

These miscategorized tests were probably the source of confusion in r194817.

llvm-svn: 194919
2013-11-16 06:20:17 +00:00
Alp Toker 9c5ae47c94 Ignore test Inputs globally and remove redundant lit.local.cfg files
By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.

This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.

llvm-svn: 194814
2013-11-15 13:37:49 +00:00
Alp Toker f9cabd9ddb Fix test that was not being run
llvm-svn: 194070
2013-11-05 12:45:40 +00:00
Alp Toker 10255c38bd Fix "existant" typos
llvm-svn: 193578
2013-10-29 02:34:44 +00:00
Tim Northover 901dee4d28 ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archs
These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.

llvm-svn: 193328
2013-10-24 10:48:50 +00:00
NAKAMURA Takumi 5cbfb3b423 clang/test/Frontend/rewrite-includes.c: Tweak expressions for r'\\', not r'\', on win32.
llvm-svn: 189591
2013-08-29 16:11:17 +00:00
Daniel Dunbar 14e88a1577 [tests] Use 'printf' instead of 'echo -e', which is not part of BSD echo.
llvm-svn: 189562
2013-08-29 03:02:39 +00:00
Rafael Espindola eb26547177 Move -mfpmath handling to -cc1 and implement it for x86.
The original idea was to implement it all on the driver, but to do that the
driver needs to know the sse level and to do that it has to know the default
features of a cpu.

Benjamin Kramer pointed out that if one day we decide to implement support for
' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to
keep its knowledge of default features of a cpu.

To avoid duplicating which part of clang handles default cpu features,
it is probably better to handle -mfpmath in the frontend.

For ARM this patch is just a small improvement. Instead of a cpu list, we
check if neon is enabled, which allows us to reject things like

-mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon

For X86, since LLVM doesn't support an independent ssefp feature, we just
make sure the selected -mfpmath matches the sse level.

llvm-svn: 188939
2013-08-21 21:59:03 +00:00
Hans Wennborg 0fd6207d37 clang-cl: Support /showIncludes
This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and adds the flag.

Differential Revision: http://llvm-reviews.chandlerc.com/D1333

llvm-svn: 188037
2013-08-09 00:32:23 +00:00
Rafael Espindola 958297dabf Indicate success for simple options when clang called with -cc1.
Patch by David Wiberg.

llvm-svn: 187888
2013-08-07 12:54:47 +00:00
Argyrios Kyrtzidis 17ff2e577f [frontend] '-frewrite-includes' should not ignore headers included from command-line.
rdar://14556182

llvm-svn: 187207
2013-07-26 15:32:04 +00:00
Lubos Lunak ba5ee4da1d avoid bogus warnings about "unknown" pragmas with -frewrite-includes (pr#14831)
llvm-svn: 186764
2013-07-20 14:30:01 +00:00
Lubos Lunak 4c22f6a695 fix sometimes incorrect line numbers in -frewrite-includes mode (pr#14795)
Every #include is surrounded by #if 0 in order to comment it out, which adds
lines. That is fixed up right after, but that all can be inside #if part
that is not processed, so fix up also after every end of a conditional part.

llvm-svn: 186763
2013-07-20 14:23:27 +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
Rafael Espindola be8a91b771 Replace 'grep foo | count 0' with 'not grep foo'.
This avoids depending on pipefail not being used.

llvm-svn: 185648
2013-07-04 15:22:16 +00:00
Rafael Espindola 157f34bd31 Update for llvm::sys::fs::unique_file not creating directories.
llvm-svn: 185127
2013-06-28 03:49:04 +00:00
Rafael Espindola 73c23a7182 Small improvements to createOutputFile.
* Use a single stat to find out if the file exists and if it is a regular file.
* Use early returns when possible.
* Add comments explaining why we have each check.

llvm-svn: 185091
2013-06-27 18:26:26 +00:00
Andy Gibbs fcc699aee8 Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.
VerifyDiagnosticConsumer previously would not check that the diagnostic and
its matching directive referenced the same source file.  Common practice was
to create directives that referenced other files but only by line number,
and this led to problems such as when the file containing the directive
didn't have enough lines to match the location of the diagnostic in the
other file, leading to bizarre file formatting and other oddities.

This patch causes VerifyDiagnosticConsumer to match source files as well as
line numbers.  Therefore, a new syntax is made available for directives, for
example:

// expected-error@file:line {{diagnostic message}}

This extends the @line feature where "file" is the file where the diagnostic
is generated.  The @line syntax is still available and uses the current file
for the diagnostic.  "file" can be specified either as a relative or absolute
path - although the latter has less usefulness, I think!  The #include search
paths will be used to locate the file and if it is not found an error will be
generated.

The new check is not optional: if the directive is in a different file to the
diagnostic, the file must be specified.  Therefore, a number of test-cases
have been updated with regard to this.

This closes out PR15613.

llvm-svn: 179677
2013-04-17 08:06:46 +00:00
Benjamin Kramer b10e615c44 rewrite-includes: Rewrite __has_include(_next) to get rid of a host dependency.
This broke e.g. compiling a crash report from a glibc system on Darwin. Sadly,
the implementation had to game the lexer a lot as we're not using a real
preprocessor here. It also doesn't handle special cases like arbitrary macros in
__has_include, but since this macro isn't common outside of clang's headers we
can get away with that.

Fixes PR14422.

Differential Revision: http://llvm-reviews.chandlerc.com/D594

llvm-svn: 179616
2013-04-16 19:08:41 +00:00
Reid Kleckner 96cf7adce2 Follow Jordan's advice and use {{^}} and {{$}} for this test
This is a better way of ensuring that we match the output of the
rewriter and not the CHECK line.

llvm-svn: 179308
2013-04-11 18:39:10 +00:00
Reid Kleckner e494399203 FileCheck-ify some clang grep tests that use double quotes
The escaping interaction between Python and grep doesn't work on my
system.  This change fixes the tests for me.

llvm-svn: 179214
2013-04-10 21:10:39 +00:00
Argyrios Kyrtzidis cf22d1f3ab [frontend] -frewrite-includes: turn implicit module imports into @imports.
rdar://13610250

llvm-svn: 179145
2013-04-10 01:53:50 +00:00
Argyrios Kyrtzidis 953ef33f59 [frontend] -frewrite-includes: if there was no inclusion, don't add lineinfo that indicates return from another file.
llvm-svn: 179143
2013-04-10 01:53:37 +00:00
Benjamin Kramer ae61151254 Escape # and $ in dependency files.
Fixes PR15642.

llvm-svn: 178540
2013-04-02 13:38:48 +00:00
Aaron Ballman 3fd576f7d6 Delayed template parsing is not supported by the AST serialization system yet, so turning it off. This fixes a test breakage caused by r177336.
llvm-svn: 177655
2013-03-21 19:38:59 +00:00
Argyrios Kyrtzidis c00f43a33f [frontend] Initialize the diagnostic client before loading an ast file.
Issue reported by Tom Honermann!
http://llvm.org/bugs/show_bug.cgi?id=15377

llvm-svn: 177336
2013-03-18 22:55:24 +00:00
Chad Rosier 5f15a35114 [driver] Warnings for warning options are handled by the frontend. The driver needs to process the
warning options to setup diagnostic state, but should not be emitting warnings as these would be
rudndant with what the frontend emits.
rdar://13001556

llvm-svn: 172497
2013-01-15 01:21:53 +00:00
Dmitri Gribenko 1654035a3b hexagon-target-basic.c test: add REQUIRES line for hexagon target
llvm-svn: 171422
2013-01-02 22:30:14 +00:00
Anshuman Dasgupta 89730ce9ee Correct Hexagon DataLayout string. Fixes bug 14744.
Patch by Krzysztof Parzyszek!

llvm-svn: 171415
2013-01-02 21:25:57 +00:00
Ulrich Weigand 35668cc401 A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type.  This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.

This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.

llvm-svn: 166551
2012-10-24 12:22:56 +00:00
Andy Gibbs 0fea04509a Change VerifyDiagnosticConsumer so that it *must* contain at least one "expected-*" directive. As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases. This new directive may not be used in conjunction with any other "expected-*" directive.
This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.

Patch reviewed by David Blaikie.

llvm-svn: 166281
2012-10-19 12:49:32 +00:00
Andy Gibbs c6e68daac0 Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
llvm-svn: 166280
2012-10-19 12:44:48 +00:00
Andy Gibbs ac51de6ec2 Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive. A very few test-cases had to be amended to adhere to the new rule.
Patch reviewed by David Blaikie.

llvm-svn: 166279
2012-10-19 12:36:49 +00:00
Douglas Gregor e6a82d9018 -iframework should allow separate arguments.
llvm-svn: 164607
2012-09-25 16:13:41 +00:00
Chris Lattner 6dc7e57d6a don't warn about unused values when the unused value is a statement expression expanded from a macro. This is of dubious utility in general, but is specifically a major issue for the linux kernel. This resolves PR13747.
llvm-svn: 163034
2012-08-31 22:39:21 +00:00
Jordan Rose b00073db80 Update VerifyDiagnosticConsumer to only get directives during parsing.
The old behavior was to re-scan any files (like modules) where we may have
directives but won't actually be parsing during the -verify invocation.
Now, we keep the old behavior in Debug builds as a sanity check (though
modules are a known entity), and expect all legitimate directives to come
from comments seen by the preprocessor.

This also affects the ARC migration tool, which captures diagnostics in
order to filter some out. This change adds an explicit cleanup to
CaptureDiagnosticsConsumer in order to let its sub-consumer handle the
real end of diagnostics.

This was originally split into four patches, but the tests do not run
cleanly without all four, so I've combined them into one commit.

Patches by Andy Gibbs, with slight modifications from me.

llvm-svn: 161650
2012-08-10 01:06:16 +00:00
Jordan Rose b13eb8dca5 Allow -verify directives to be filtered by preprocessing.
This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler,
which then only reads the -verify directives that are actually in live
blocks of code. It also makes it simpler to handle -verify directives that
appear in header files, though we still have to manually reparse some files
depending on how they are generated.

This requires some test changes. In particular, all PCH tests now have their
-verify directives outside the "header" portion of the file, using the @line
syntax added in r159978. Other tests have been modified mostly to make it
clear what is being tested, and to prevent polluting the expected output with
the directives themselves.

Patch by Andy Gibbs! (with slight modifications)

The new Frontend/verify-* tests exercise the functionality of this commit,
as well as r159978, r159979, and r160053 (Andy's other -verify enhancements).

llvm-svn: 160068
2012-07-11 19:58:23 +00:00
David Blaikie 9ff952fac6 Remove absolute path form include test.
Review feedback/bot failure from r158459 by Simon Atanasyan and Benjamin Kramer (on IRC).

llvm-svn: 158464
2012-06-14 19:55:56 +00:00
David Blaikie 76cae518cf Fix crash on missing header in -rewrite-includes.
llvm-svn: 158459
2012-06-14 17:36:05 +00:00
David Blaikie 619117a31d Rename -rewrite-includes to -frewrite-includes.
llvm-svn: 158458
2012-06-14 17:36:01 +00:00
Richard Smith 8acadcb84b Add -isystem-prefix and -ino-system-prefix arguments, which can be used to
override whether headers are system headers by checking for prefixes of the
header name specified in the #include directive.

This allows warnings to be disabled for third-party code which is found in
specific subdirectories of include paths.

llvm-svn: 158418
2012-06-13 20:27:03 +00:00
NAKAMURA Takumi 29aaccda13 test/Frontend/rewrite-includes.c: Tweak for win32's pathsep.
llvm-svn: 158149
2012-06-07 14:21:02 +00:00
David Blaikie d5321247c4 Add a -rewrite-includes option, which is similar to -rewrite-macros, but only expands #include directives.
Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).

llvm-svn: 158093
2012-06-06 18:52:13 +00:00
Benjamin Kramer 778b8b84b8 Escape % in diagnostic message when compiling LLVM IR.
% is a common character in IR so we'd crash on almost any malformed IR. The
diagnostic formatter expects a formatting directive when it sees an unescaped %.

llvm-svn: 152956
2012-03-16 22:31:42 +00:00
David Blaikie 040a3a28f1 Remove the unuseful -fdiagnostics-show-name
This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.

Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.

Reviewed by Chris Lattner & Ted Kremenek.

llvm-svn: 150612
2012-02-15 19:45:34 +00:00
Ted Kremenek 7f4bd16b53 Per discussion on cfe-dev, remove '#error' and '#warning' from diagnostic text.
llvm-svn: 149566
2012-02-02 00:16:13 +00:00
Argyrios Kyrtzidis 8823d12a53 Add test for -Wno-everything.
llvm-svn: 149123
2012-01-27 07:10:14 +00:00
Sebastian Pop 422377cfd3 rename -ccc-host-triple into -target
llvm-svn: 148582
2012-01-20 22:01:23 +00:00
Eli Friedman d749c6bf2e Revert r148138; it's causing test failures.
llvm-svn: 148141
2012-01-13 21:33:06 +00:00
Sebastian Pop 9a8d528ddf rename -ccc-host-triple into -target
llvm-svn: 148138
2012-01-13 20:37:02 +00:00
NAKAMURA Takumi 5dd3777633 test/Frontend/dependency-gen.c: Relax expressions for Win32 host (mingw msys).
llvm-svn: 144887
2011-11-17 07:21:33 +00:00
Daniel Dunbar b274318bba Frontend: Support -iframework.
llvm-svn: 142418
2011-10-18 20:40:38 +00:00
Daniel Dunbar 2fba0979fe Basic/Diagnostics: Apparently, #pragma ... diagnostic is intended to override
the command line options (at least according to GCC's documentation). GCC 4.2
didn't appear to actually do this, but it seems like that has been fixed in
later release, so we will follow the docs.

llvm-svn: 141119
2011-10-04 21:17:24 +00:00
Daniel Dunbar 58d0af6c5f Basic/Diagnostics: Rewrite DiagnosticIDs::getDiagnosticLevel completely to be straighter line code, use the new DiagnosticMappingInfo flags, and eliminate the odd MAP_WARNING_NO_WERROR and friend mappings.
- This fixes a host of obscure bugs with regards to how warning mapping options composed with one another, and I believe makes the code substantially easier to read and reason about.

llvm-svn: 140770
2011-09-29 01:58:05 +00:00
Daniel Dunbar e9a700cba1 tests: Add some more tests for warning mappings.
llvm-svn: 140764
2011-09-29 01:37:40 +00:00
Daniel Dunbar aa11138543 Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker.
- The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though.

llvm-svn: 140752
2011-09-29 01:01:08 +00:00
NAKAMURA Takumi 9a9ec73665 Revert r134898, "test/Frontend/dependency-gen.c: Mark XFAIL: mingw due to PR10331. to appease mingw-target (and non-mingw-host) builds.
PR10331 is still alive I suppose.

llvm-svn: 134931
2011-07-11 22:34:14 +00:00
NAKAMURA Takumi 7392a5f92f test/Frontend/dependency-gen.c: Mark XFAIL: mingw due to PR10331.
llvm-svn: 134898
2011-07-11 16:21:28 +00:00
Eli Friedman f7ca26a077 Fix up dependency file name printing to more closely match that of gcc, including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./".
rdar://problem/9734352

llvm-svn: 134728
2011-07-08 20:17:28 +00:00
Nick Lewycky a6820332b3 The macros defined by the language standard are still available even when the
-undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't
ask.)

llvm-svn: 132708
2011-06-07 06:07:12 +00:00
Galina Kistanova a6faf8e28b These tests require particular registered targets. Declared as such.
llvm-svn: 132623
2011-06-04 04:38:16 +00:00
John McCall 92e18ed40f Stop leaving a.out files around.
llvm-svn: 131396
2011-05-16 02:23:45 +00:00
Douglas Gregor 46ce91a964 Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq
llvm-svn: 129614
2011-04-15 22:04:17 +00:00
Fariborz Jahanian 193f783a99 Fixes a crash when generating dependency file stuff
and output file is not writable. // rdar://9286457.

llvm-svn: 129587
2011-04-15 18:49:23 +00:00
NAKAMURA Takumi f5ea88b8ab test: Add the feature "shell". Frontend/dependency-gen.c would be executable with shell.
The feature "shell" is implemented in llvm/test.

llvm-svn: 126646
2011-02-28 09:41:07 +00:00
Chandler Carruth f8da8c7fa7 Tweak this test a bit further to make it easier on grep. Who knows what
characters get dropped into the regular expression from %t.

llvm-svn: 126361
2011-02-24 02:39:40 +00:00
Chandler Carruth 220617c1ba Clean up the CMake test execution by nuking this directory before we try
to create it. Lit doesn't apparently clean up test directories
effectively, and so this broke randomly on subsequent runs.

Also XFAIL the test on windows, as there's not much hope for these
commands doing the right thing there.

Paired with Nick Lewycky.

llvm-svn: 126344
2011-02-23 23:52:14 +00:00
Nick Lewycky 3607989847 Preserve what the user passed to -include when emitting .d files. Fixes PR8974!
llvm-svn: 126334
2011-02-23 21:16:44 +00:00
Daniel Dunbar d435275c59 Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
   it doesn't seem useful or obvious.

llvm-svn: 111983
2010-08-24 22:44:13 +00:00
Douglas Gregor 618e64a23b Revert r110440, the fix for PR4897. Chris claims to have a better way.
llvm-svn: 110544
2010-08-08 07:49:23 +00:00
Douglas Gregor d26129a98a Fix the #include search path when reading from stdin, from Jon Simons!
Fixes PR4897.

llvm-svn: 110440
2010-08-06 12:06:13 +00:00
Daniel Dunbar b2447154e0 Driver/Darwin: Resolve deployment target defaulting to be more predictable;
assume we are targetting OS X unless an explicit option is given.

llvm-svn: 108426
2010-07-15 16:18:06 +00:00
Daniel Dunbar aa2d0ceaa9 tests: Update Frontend config to actually run ir-support tests.
llvm-svn: 106144
2010-06-16 20:04:36 +00:00
Chris Lattner 58efac6120 add a testcase, from Michael Spencer
llvm-svn: 106026
2010-06-15 18:56:20 +00:00
Daniel Dunbar d839e77b12 Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.
llvm-svn: 105830
2010-06-11 20:10:12 +00:00
Daniel Dunbar 6f8362c6bf Frontend: Add CodeGenAction support for handling LLVM IR.
- This magically enables using 'clang -cc1' as a replacement for most of 'llvm-as', 'llvm-dis', 'llc' and 'opt' functionality.

For example, 'llvm-as' is:
  $ clang -cc1 -emit-llvm-bc FOO.ll -o FOO.bc
and 'llvm-dis' is:
  $ clang -cc1 -emit-llvm    FOO.bc -o -
and 'opt' is, e.g.:
  $ clang -cc1 -emit-llvm -O3 -o FOO.opt.ll FOO.ll
and 'llc' is, e.g.:
  $ clang -cc1 -S -o - FOO.ll

The nice thing about using the backend tools this way is that they are guaranteed to exactly match how the compiler generates code (for example, setting the same backend options).

llvm-svn: 105583
2010-06-07 23:27:59 +00:00
Daniel Dunbar d281a7146a Fix PR5982, a refacto in checking for '=' in a -D argument.
llvm-svn: 93088
2010-01-10 00:46:21 +00:00
Daniel Dunbar 5618e98f33 Update tests to use %clang instead of 'clang', and forcibly disable use of '
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).

llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar 7c71b6b95b Use '-FOO' 'BAR' instead of '-FOO=BAR' in tests.
llvm-svn: 90122
2009-11-30 08:41:04 +00:00
Daniel Dunbar 2eaef18e76 Fix refactoro, clang-cc wasn't properly reporting errors when opening an output file failed.
llvm-svn: 89502
2009-11-20 22:32:38 +00:00
Daniel Dunbar 34546ce43d Remove RUN: true lines.
llvm-svn: 86432
2009-11-08 01:47:25 +00:00
Daniel Dunbar 8b57697954 Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

llvm-svn: 86430
2009-11-08 01:45:36 +00:00
Daniel Dunbar 2fd33fe701 Don't run anything other than the compiler in these tests.
llvm-svn: 86134
2009-11-05 15:28:24 +00:00
Daniel Dunbar eec7d75a4e Fix tests to not depend on /dev/null existing.
llvm-svn: 85908
2009-11-03 17:56:18 +00:00
Daniel Dunbar f3355a61c4 Remove clang-cc code for handling -mmacosx-version-min and
-miphoneos-version-min.

llvm-svn: 85601
2009-10-30 18:12:31 +00:00
Daniel Dunbar 431895f748 clang-cc: Allow building for x86_64 with -mmacosx-version-min=10.4.
llvm-svn: 85132
2009-10-26 17:52:49 +00:00
Daniel Dunbar b45012dcde Update PCH serialization of FunctionDecl flags.
llvm-svn: 82526
2009-09-22 05:38:14 +00:00
Daniel Dunbar 607a2a1ed1 Add an XFAIL test which compiles differently from a .ast.
llvm-svn: 82437
2009-09-21 05:16:43 +00:00
Daniel Dunbar 26e37a77c6 Switch ProcessASTInputFile to still use ParseAST.
- Currently this requires us to fake an input file.

 - This allows Sema to be keep all the logic for how to pull decls out of the external AST source and how to handle things like tentative definitions.

llvm-svn: 82432
2009-09-21 03:03:56 +00:00
Daniel Dunbar e9fee8a361 Initial support for code generation from .ast files.
- Doesn't actually work yet because only module level asm's get correctly marked as externally visible in the PCH.

 - Other things like 'clang-cc foo.ast -ast-dump' now work, as well.

llvm-svn: 82107
2009-09-17 00:48:13 +00:00
Daniel Dunbar 97ea867690 MultiTestRunner: Validate '&&' at the end of RUN lines.
- This is just to normalize, these will go away soon hopefully.

Added all the missing '&&'s that have crept in. :)

llvm-svn: 77062
2009-07-25 11:27:37 +00:00
Daniel Dunbar 6bdd19a7e2 Change these tests to not depend as much on the name of the input.
llvm-svn: 77057
2009-07-25 09:01:12 +00:00
Daniel Dunbar 367dbb9760 Forward -C and -CC to clang.
- <rdar://problem/6945384> Driver should pass down -C and -CC

llvm-svn: 73087
2009-06-08 21:48:20 +00:00
Fariborz Jahanian e49adaf7f2 Fixed the test.
llvm-svn: 68831
2009-04-10 22:09:52 +00:00
Fariborz Jahanian 5240a49f04 Add a test case for my last patch.
llvm-svn: 68829
2009-04-10 21:43:13 +00:00
Daniel Dunbar de46660cda Test case for -miphoneos-version-min, also part of Shantonu's patch!
llvm-svn: 68817
2009-04-10 20:13:51 +00:00
Daniel Dunbar 759b1c9b80 Fix -MD with no -MT when -o is specified (and fix test case).
llvm-svn: 68042
2009-03-30 17:59:58 +00:00
Daniel Dunbar d67a32252c Driver: Support -M and -MM.
- Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.

llvm-svn: 68027
2009-03-30 06:36:42 +00:00
Daniel Dunbar 52e96cc932 Improve dependency file support.
- Rip out various bits of logic from clang-cc's dependency file gen,
   force driver to provide instead.

 - -MD output now goes to proper location
<rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name

 - -M and -MM still don't work correctly.

llvm-svn: 68022
2009-03-30 00:34:04 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Eli Friedman bae2042bb5 Don't use &> in tests; dash doesn't understand it.
llvm-svn: 67483
2009-03-22 21:49:20 +00:00
Chris Lattner 37082e2a39 fix test
llvm-svn: 67455
2009-03-21 23:59:11 +00:00
Daniel Dunbar 8e93780c86 Frontend: Handle empty input on stdin.
- PR3854.

I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.

llvm-svn: 67448
2009-03-21 17:55:43 +00:00
Daniel Dunbar 51adf5824e Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.

llvm-svn: 65811
2009-03-02 06:16:29 +00:00