Dan Gohman
145f3f1e83
Fix -Wcast-qual warnings.
...
llvm-svn: 101786
2010-04-19 16:39:44 +00:00
Daniel Dunbar
76fa840d09
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.
llvm-svn: 101354
2010-04-15 06:09:03 +00:00
Daniel Dunbar
8ee6760971
Fronted: Kill overly specialized RecordLayoutDumper, just make -dump-record-layouts a bit that Sema honors.
...
llvm-svn: 100747
2010-04-08 02:59:56 +00:00
Chris Lattner
1f054ecca2
update for api change.
...
llvm-svn: 100718
2010-04-07 23:12:35 +00:00
Chris Lattner
6d67213ebb
reduce indentation, tidy.
...
llvm-svn: 100537
2010-04-06 17:52:14 +00:00
Chris Lattner
61955ab200
inline in MC assembly parsers. clang -integrated-as now
...
works with inline asm!
llvm-svn: 100493
2010-04-05 23:33:20 +00:00
Daniel Dunbar
e43887bd2b
Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
...
Clang++ support, even in "Production" mode (for testing purposes).
llvm-svn: 100119
2010-04-01 18:21:41 +00:00
Douglas Gregor
171b780c91
Teach Clang's -cc1 option -print-stats to print LLVM statistics.
...
llvm-svn: 99894
2010-03-30 17:33:59 +00:00
Chris Lattner
09f8cc8c70
make -ftime-report work even in -disable-free mode. Woo, finally.
...
rdar://7781603
llvm-svn: 99878
2010-03-30 05:39:52 +00:00
Daniel Dunbar
30b24e95fa
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.
llvm-svn: 99258
2010-03-23 05:09:16 +00:00
Daniel Dunbar
6a8efa8a79
Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.
...
llvm-svn: 99054
2010-03-20 08:01:59 +00:00
Daniel Dunbar
1c201fbf73
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.
llvm-svn: 98978
2010-03-19 19:44:04 +00:00
Jeffrey Yasskin
f6442f80cb
Allow users to set CPPFLAGS and CXXFLAGS on the make command line.
...
Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)
llvm-svn: 98399
2010-03-12 22:55:16 +00:00
Kovarththanan Rajaratnam
4bc61181f9
Mark variable as const
...
llvm-svn: 97951
2010-03-08 18:33:04 +00:00
Daniel Dunbar
cea0c70f12
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.
llvm-svn: 97110
2010-02-25 04:37:45 +00:00
Daniel Dunbar
12ee380a61
Driver: Use TextDiagnosticPrinter instead of a custom one.
...
llvm-svn: 97102
2010-02-25 03:23:43 +00:00
Daniel Dunbar
43b464cfe5
Remove unused includes.
...
llvm-svn: 96760
2010-02-21 21:47:19 +00:00
Daniel Dunbar
d2b20c1348
clang: Add support for s// edit form of QA_OVERRIDE_GCC3_OPTIONS.
...
- Used to do regex patsubst on arguments.
llvm-svn: 96512
2010-02-17 21:00:34 +00:00
Daniel Dunbar
e922d9bdf0
CompilerInstance: Move LLVMContext member out of constructor.
...
llvm-svn: 96314
2010-02-16 01:54:47 +00:00
Daniel Dunbar
aced322c3c
Switch clang to use its own LLVMContext (not the global one).
...
llvm-svn: 96313
2010-02-16 01:54:33 +00:00
Douglas Gregor
62d311fdf4
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.
llvm-svn: 95683
2010-02-09 19:21:46 +00:00
Daniel Dunbar
92db0fbe5a
clang -cc1: Wire up -emit-obj, for emitting object files.
...
llvm-svn: 95182
2010-02-03 01:18:43 +00:00
Chandler Carruth
7e6c0fcc59
Bring driver link order in CMake into alignment with the order in the Makefile.
...
This includes the fix in r94797 to reflect the new dependency of Sema on
Analysis.
llvm-svn: 94806
2010-01-29 10:03:42 +00:00
Zhongxing Xu
0fcbe369aa
Fix linking problem on Linux.
...
llvm-svn: 94797
2010-01-29 03:25:47 +00:00
Ted Kremenek
d6b8708643
Split libAnalysis into two libraries: libAnalysis and libChecker.
...
(1) libAnalysis is a generic analysis library that can be used by
Sema. It defines the CFG, basic dataflow analysis primitives, and
inexpensive flow-sensitive analyses (e.g. LiveVariables).
(2) libChecker contains the guts of the static analyzer, incuding the
path-sensitive analysis engine and domain-specific checks.
Now any clients that want to use the frontend to build their own tools
don't need to link in the entire static analyzer.
This change exposes various obvious cleanups that can be made to the
layout of files and headers in libChecker. More changes pending. :)
This change also exposed a layering violation between AnalysisContext
and MemRegion. BlockInvocationContext shouldn't explicitly know about
BlockDataRegions. For now I've removed the BlockDataRegion* from
BlockInvocationContext (removing context-sensitivity; although this
wasn't used yet). We need to have a better way to extend
BlockInvocationContext (and any LocationContext) to add
context-sensitivty.
llvm-svn: 94406
2010-01-25 04:41:41 +00:00
Chris Lattner
0bcc858a2b
-fno-rtti is now the default.
...
llvm-svn: 94379
2010-01-24 20:43:31 +00:00
Douglas Gregor
fb00d93c98
Make CMake's clang++ installation respect DESTDIR, based on a patch by
...
Ingmar Vanhassel. Fixes PR6046.
llvm-svn: 93741
2010-01-18 18:27:29 +00:00
Daniel Dunbar
e2aa06d4ae
Don't build/install clang++ in CLANG_IS_PRODUCTION build mode yet.
...
llvm-svn: 93732
2010-01-18 17:52:48 +00:00
Daniel Dunbar
4f2bc55d4e
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.
llvm-svn: 93282
2010-01-13 00:48:06 +00:00
Daniel Dunbar
7d38d4da61
cc1: Lift creation of the FrontendAction higher.
...
llvm-svn: 93281
2010-01-13 00:47:51 +00:00
Daniel Dunbar
b2138e5529
Driver: Use "g++" as generic gcc name when running in C++ mode, for platforms
...
that lack real tool definitions.
llvm-svn: 92164
2009-12-25 20:21:23 +00:00
Kovarththanan Rajaratnam
55e74a1a6a
Remove RewriteBlocks. It has been superseded by RewriteObjC
...
llvm-svn: 92014
2009-12-23 18:03:34 +00:00
Daniel Dunbar
282c9b9cc1
Fix pretty stack traces.
...
llvm-svn: 91537
2009-12-16 11:47:38 +00:00
Daniel Dunbar
a5a166d01a
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.
llvm-svn: 91370
2009-12-15 00:06:45 +00:00
Daniel Dunbar
d613677ec9
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
...
llvm-svn: 91237
2009-12-13 03:45:58 +00:00
Jeffrey Yasskin
1615d45daa
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
llvm-svn: 91207
2009-12-12 05:05:38 +00:00
Daniel Dunbar
f72bdf7eed
Implement clang -cc1.
...
- I apologize for the link time horrors, my goal is to kill off clang-cc in fairly short order.
llvm-svn: 91170
2009-12-11 22:20:12 +00:00
Jeffrey Yasskin
567ae47b4a
Remove several .c_str() to be forward-compatible with StringRef.
...
llvm-svn: 90822
2009-12-08 01:46:24 +00:00
Rafael Espindola
73d4637545
Add gcc's -no-canonical-prefixes option to clang.
...
llvm-svn: 90577
2009-12-04 19:31:58 +00:00
Daniel Dunbar
1c39f3c89d
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.
llvm-svn: 90114
2009-11-30 07:18:13 +00:00
Daniel Dunbar
fcb9caa772
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.
llvm-svn: 90092
2009-11-29 20:58:50 +00:00
Daniel Dunbar
65ca1c6f02
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.
...
llvm-svn: 90090
2009-11-29 20:58:32 +00:00
Daniel Dunbar
a604639635
Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.
...
llvm-svn: 89503
2009-11-20 22:47:55 +00:00
Benjamin Kramer
df5280df05
Add a workaround to silence a bogus g++-4.4 -pedantic warning.
...
driver.cpp:211: warning: ISO C++ forbids zero-size array 'argv'
llvm-svn: 89455
2009-11-20 11:49:06 +00:00
Daniel Dunbar
84e8a249fa
Fix some default in the option classes, and some CompilerInvocation argification
...
errors.
llvm-svn: 89388
2009-11-19 20:54:59 +00:00
Douglas Gregor
45959e5556
Try yet again to de-bork CMake Windows build w.r.t. clang++
...
llvm-svn: 89361
2009-11-19 16:42:34 +00:00
Douglas Gregor
c3851cd0d8
Try to fix CMake clang++ creation on Windows
...
llvm-svn: 89336
2009-11-19 07:59:29 +00:00
Daniel Dunbar
51cd8f085f
Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.
...
llvm-svn: 89333
2009-11-19 07:37:51 +00:00
Douglas Gregor
564d41fbe4
CMake goop to create clang++ symlink
...
llvm-svn: 89320
2009-11-19 05:46:45 +00:00
Daniel Dunbar
da13faf982
Driver: ArgList doesn't depend on Options.h anymore.
...
llvm-svn: 89313
2009-11-19 04:25:22 +00:00