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

17 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 169b753b45 Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106602 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-22 23:43:22 +00:00
Daniel Dunbar 6c6424bc0d Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
  $ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
  $ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
  $ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105584 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:28:45 +00:00
Daniel Dunbar 51679c5e48 PR5803: clang++: Treat untyped 'C' inputs as C++.
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
   diagnostic when we do this. We'll see what zee users say.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 20:32:58 +00:00
Nate Begeman edcfc41114 Allow clang to pass -x cl through to compiler driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:00:15 +00:00
Nuno Lopes 68f7a24262 spread 'const' love to some variables. this considerably reduces the amount of dirty data around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91002 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-10 00:07:02 +00:00
Daniel Dunbar 90cb920bfa Recognize .hpp as a C++ header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89630 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22 22:08:27 +00:00
Daniel Dunbar d8e0e4530b Driver: Make local type name more distinct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-18 20:19:26 +00:00
Daniel Dunbar 77544fde70 Add driver::types::isObjC predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 08:07:16 +00:00
Douglas Gregor 55d3f7ae51 [llvm up]
Switch a few ugly switch-on-string-literal constructs to use the new
llvm::StringSwitch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29 00:41:01 +00:00
Mike Stump 1eb4433ac4 Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Daniel Dunbar 5915fbf310 Add driver support for -emit-ast and AST compilation steps.
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-01 16:57:46 +00:00
Daniel Dunbar 4db938ceb7 Driver: Add types::{isAcceptedByClang,isCXX} predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66986 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 23:46:19 +00:00
Daniel Dunbar 3dbd6c51bc Driver: Some minor bug fixes.
- language recognition was recognizing prefixes incorrectly.
 - -x none wasn't working.
 - test for "can lipo" was backwords.
 - missed a '"' in -ccc-print-phases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 17:46:02 +00:00
Daniel Dunbar c1b5fa81a2 Driver: Add types::getNumCompilationPhases, getCompilationPhase to
provide information about what steps should be done for a particular
file type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 11:28:30 +00:00
Daniel Dunbar ba7db7d8b4 Driver: Drop some unnecessary uses of clang namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66813 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 18:31:08 +00:00
Daniel Dunbar 9f5ef9426f Driver: Add types::canLipoType helper method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 18:21:41 +00:00
Daniel Dunbar e9fba573bd Driver: Add information on Driver input/temporary types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66781 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 07:40:41 +00:00