Douglas Gregor
f78cc4360e
Add a stub frontend action for BoostCon, for next week's workshop.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 15:41:56 +00:00
Dan Gohman
cb421fa690
Fix -Wcast-qual warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-19 16:39:44 +00:00
Daniel Dunbar
3f87fb08dd
Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM option parser.
...
- Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 06:09:03 +00:00
Daniel Dunbar
b69eca5d21
Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-08 02:59:56 +00:00
Chris Lattner
1e3c6f4ab5
update for api change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 23:12:35 +00:00
Chris Lattner
cabae68037
reduce indentation, tidy.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100537 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 17:52:14 +00:00
Chris Lattner
01ae93fde8
inline in MC assembly parsers. clang -integrated-as now
...
works with inline asm!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 23:33:20 +00:00
Douglas Gregor
95dd5583e3
Teach Clang's -cc1 option -print-stats to print LLVM statistics.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99894 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 17:33:59 +00:00
Chris Lattner
30bc7e8e56
make -ftime-report work even in -disable-free mode. Woo, finally.
...
rdar://7781603
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99878 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-30 05:39:52 +00:00
Daniel Dunbar
42444fb53c
Frontend: Don't free the CompilerInstance or FrontendActions when running under
...
-disable-free. Among other things, this fixes freeing of the LLVM module on
exit.
- Note that this means we are disable-free'ing of a lot more stuff than we used to -- this should flush out bugs in anything left that is trying to do real work in its destructor. I did a mini-audit but '::~' is not totally uncommon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 05:09:16 +00:00
Daniel Dunbar
2758595023
clang -cc1: Kill off -empty-input only, and replace with -init-only which is an
...
actual action.
- This is easier to use, and more reliable for timing the thing this was
actually meant to be useful for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98978 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 19:44:04 +00:00
Daniel Dunbar
4ee34616c6
Frontend: Pull CodeGenAction out more, and eliminate CreateBackendConsumer.
...
This is the way I would like to move the frontend function towards -- distinct
pieces of functionality should be exposed only via FrontendAction
implementations which have clean and relatively-stable APIs.
This also isolates the surface area in clang which depends on LLVM CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 04:37:45 +00:00
Daniel Dunbar
79b7f9af94
Remove unused includes.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96760 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-21 21:47:19 +00:00
Daniel Dunbar
42e9f8e498
CompilerInstance: Move LLVMContext member out of constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96314 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 01:54:47 +00:00
Daniel Dunbar
f25491dd27
Switch clang to use its own LLVMContext (not the global one).
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96313 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 01:54:33 +00:00
Douglas Gregor
9bed879896
Introduce a testbed for merging multiple ASTs into a single AST
...
context with the AST importer. WIP, still useless but at least it has
a test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-09 19:21:46 +00:00
Daniel Dunbar
da1573f959
clang -cc1: Wire up -emit-obj, for emitting object files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95182 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:18:43 +00:00
Daniel Dunbar
0397af277e
cc1: Factor out CompilerInstance::ExecuteAction which has the majority of the
...
clang -cc1 logic for running an action against a set of options.
- This should make it easier to build tools that have a clang -cc1 like
interface, but aren't actually part of clang -cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:48:06 +00:00
Daniel Dunbar
a817b77bbb
cc1: Lift creation of the FrontendAction higher.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:47:51 +00:00
Kovarththanan Rajaratnam
49ac8e63a0
Remove RewriteBlocks. It has been superseded by RewriteObjC
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-23 18:03:34 +00:00
Daniel Dunbar
3055be7e5a
Fix pretty stack traces.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91537 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 11:47:38 +00:00
Daniel Dunbar
8b9adfea5e
Add -resource-dir to clang -cc1, this allows the base directory for compiler
...
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 00:06:45 +00:00
Daniel Dunbar
1e69fe3a9f
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-13 03:45:58 +00:00
Jeffrey Yasskin
9f61aa9e28
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-12 05:05:38 +00:00
Daniel Dunbar
2108577809
Implement clang -cc1.
...
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-11 22:20:12 +00:00
Daniel Dunbar
c88aa79a6b
Put CompilerInvocation testing code in clang-cc instead of clang for now, I can't bear to link all of clang into 'clang' yet. :)
...
- Still triggered by a magic leading -cc1 argument, as before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-30 07:18:13 +00:00
Daniel Dunbar
e03245246a
Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
...
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 20:58:50 +00:00
Daniel Dunbar
545c28117c
Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-29 20:58:32 +00:00
Daniel Dunbar
20be8c4551
Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-20 22:47:55 +00:00
Daniel Dunbar
1be3b3bd5c
Fix some default in the option classes, and some CompilerInvocation argification
...
errors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89388 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 20:54:59 +00:00
Daniel Dunbar
217acbfa35
Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89333 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 07:37:51 +00:00