Граф коммитов

37 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar f7c16d903f Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
   it doesn't seem useful or obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111983 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:44:13 +00:00
Douglas Gregor 10fe93d57c Revert r110440, the fix for PR4897. Chris claims to have a better way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110544 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-08 07:49:23 +00:00
Douglas Gregor 91db30ad4a Fix the #include search path when reading from stdin, from Jon Simons!
Fixes PR4897.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 12:06:13 +00:00
Daniel Dunbar 2bb38d0d93 Driver/Darwin: Resolve deployment target defaulting to be more predictable;
assume we are targetting OS X unless an explicit option is given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108426 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-15 16:18:06 +00:00
Daniel Dunbar 65d72857b3 tests: Update Frontend config to actually run ir-support tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-16 20:04:36 +00:00
Chris Lattner d5ef4fa303 add a testcase, from Michael Spencer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-15 18:56:20 +00:00
Daniel Dunbar c72cc5072c Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-11 20:10:12 +00:00
Daniel Dunbar 4cbbd94d0a 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:27:59 +00:00
Daniel Dunbar 1ee4b9e6d2 Fix PR5982, a refacto in checking for '=' in a -D argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93088 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 00:46:21 +00:00
Daniel Dunbar 80737ad5e0 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 22:01:24 +00:00
Daniel Dunbar a5728872c7 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:14:24 +00:00
Daniel Dunbar 78d5590d89 Use '-FOO' 'BAR' instead of '-FOO=BAR' in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 08:41:04 +00:00
Daniel Dunbar fc97102a80 Fix refactoro, clang-cc wasn't properly reporting errors when opening an output file failed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 22:32:38 +00:00
Daniel Dunbar 2475d76920 Remove RUN: true lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 01:47:25 +00:00
Daniel Dunbar 4fcfde4d5c Eliminate &&s in tests.
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 01:45:36 +00:00
Daniel Dunbar ff87603939 Don't run anything other than the compiler in these tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-05 15:28:24 +00:00
Daniel Dunbar e584b6538a Fix tests to not depend on /dev/null existing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03 17:56:18 +00:00
Daniel Dunbar 7c15e71fb2 Remove clang-cc code for handling -mmacosx-version-min and
-miphoneos-version-min.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30 18:12:31 +00:00
Daniel Dunbar 09bdd599c1 clang-cc: Allow building for x86_64 with -mmacosx-version-min=10.4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26 17:52:49 +00:00
Daniel Dunbar 7f8b57aa35 Update PCH serialization of FunctionDecl flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-22 05:38:14 +00:00
Daniel Dunbar 657f21bee4 Add an XFAIL test which compiles differently from a .ast.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 05:16:43 +00:00
Daniel Dunbar a674bf437e 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21 03:03:56 +00:00
Daniel Dunbar aca2ebdf41 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-17 00:48:13 +00:00
Daniel Dunbar 025f80dfc2 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. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77062 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 11:27:37 +00:00
Daniel Dunbar 772a5e540d Change these tests to not depend as much on the name of the input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77057 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 09:01:12 +00:00
Daniel Dunbar 3a183d3d46 Forward -C and -CC to clang.
- <rdar://problem/6945384> Driver should pass down -C and -CC


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-08 21:48:20 +00:00
Fariborz Jahanian 4789282849 Fixed the test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68831 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 22:09:52 +00:00
Fariborz Jahanian 2b939864e6 Add a test case for my last patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68829 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 21:43:13 +00:00
Daniel Dunbar c7a4ba51b8 Test case for -miphoneos-version-min, also part of Shantonu's patch!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68817 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 20:13:51 +00:00
Daniel Dunbar 46562b9122 Fix -MD with no -MT when -o is specified (and fix test case).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68042 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 17:59:58 +00:00
Daniel Dunbar cd8e4c44dd Driver: Support -M and -MM.
- Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 06:36:42 +00:00
Daniel Dunbar a5a7bd0de7 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 00:34:04 +00:00
Daniel Dunbar d7d5f0223b Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 02:24:46 +00:00
Eli Friedman 1ab10d45bf Don't use &> in tests; dash doesn't understand it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 21:49:20 +00:00
Chris Lattner 0c3c576453 fix test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67455 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-21 23:59:11 +00:00
Daniel Dunbar 54dfd5cad1 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-21 17:55:43 +00:00
Daniel Dunbar e1bd4e6d7c Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 06:16:29 +00:00