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