Daniel Dunbar
a94d873b4b
Move backend output out of destructor.
...
Don't free AST consumer when --disable-free is set.
llvm-svn: 59030
2008-11-11 06:35:39 +00:00
Ted Kremenek
14f18653f6
Hook up the Plist diagnostic client to the driver.
...
Fix Plist output.
llvm-svn: 58652
2008-11-03 23:18:07 +00:00
Ted Kremenek
e868c00d5a
Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'
...
llvm-svn: 58646
2008-11-03 22:31:48 +00:00
Daniel Dunbar
ada702ef45
Turn off module verification in Release-Asserts builds.
...
llvm-svn: 58500
2008-10-31 09:34:21 +00:00
Daniel Dunbar
f8362f9e5d
"One" line fix for -parse-noop failure, "id" and several other things
...
were being treated as type names for non-Objective-C files.
- Other lines are just because MinimalAction didn't have access to
the LangOptions.
llvm-svn: 58498
2008-10-31 08:56:51 +00:00
Daniel Dunbar
e74f2c2633
Improve llvm-gcc compatibility, -Os implies -O2 (sortof).
...
llvm-svn: 58374
2008-10-29 07:56:11 +00:00
Daniel Dunbar
a3730a23a2
Choose CompileOptions (optimization passes) to match llvm-gcc more
...
closely.
llvm-svn: 58361
2008-10-29 03:42:18 +00:00
Chris Lattner
1500970962
.s files don't require the preprocessor, patch by Roman Divacky!
...
llvm-svn: 58349
2008-10-28 20:33:42 +00:00
Daniel Dunbar
460f8ee507
Call llvm_shutdown() on (normal) termination. This makes --time-passes usable.
...
llvm-svn: 58308
2008-10-28 00:38:08 +00:00
Daniel Dunbar
1a0625e5cf
With -verify, only exit early on failure.
...
- Nice if -verify test exercise the various cleanup functions.
llvm-svn: 58285
2008-10-27 22:10:13 +00:00
Daniel Dunbar
eb3e41417d
Remove unneeded CheckASTConsumer function.
...
- No functionality change.
llvm-svn: 58282
2008-10-27 22:03:52 +00:00
Ted Kremenek
3773bbce54
Use string literal for format string specifier; this prevents ErrMsg from being interpretted as a format string specifier.
...
llvm-svn: 58150
2008-10-25 20:19:34 +00:00
Daniel Dunbar
fa0caca6d2
Add initial dependency file generation support. Patch by Kovarththanan
...
Rajaratnam, with some updates and formatting changes.
llvm-svn: 58122
2008-10-24 22:12:41 +00:00
Ted Kremenek
6779f893b9
Make the analyzer store (memory model) a command line option.
...
llvm-svn: 58056
2008-10-24 01:04:59 +00:00
Ted Kremenek
45e2b90d3d
Added driver option "-cxx-inheritance-view" for viewing the C++ hierarchy of a class in GraphViz.
...
llvm-svn: 58051
2008-10-23 23:36:29 +00:00
Daniel Dunbar
71880e738a
Add -O[0-3s] support (following llvm-gcc).
...
- Passes match llvm-gcc but many of the switches aren't wired.
llvm-svn: 58034
2008-10-23 05:50:47 +00:00
Chris Lattner
720d515ee9
Add support for assembler-with-cpp (preprocessed .S files), patch by
...
Roman Divacky!
llvm-svn: 57988
2008-10-22 17:29:21 +00:00
Daniel Dunbar
c13935e8be
[LLVM up] Add basic -S option to clang.
...
- Split backend related consumer out into Backend.cpp, replaces
LLVMCodeGenWriter.
- Structure follows llvm-gcc to some extent.
- Still need to implement all the options which impact code
generation and the optimization passes which llvm-gcc uses at
various levels.
llvm-svn: 57936
2008-10-21 23:49:24 +00:00
Steve Naroff
a0ed165a84
Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning is over enthusiastic.
...
Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings.
Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature.
Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this.
llvm-svn: 57898
2008-10-21 10:37:50 +00:00
Ted Kremenek
8ab23ade80
Added the start of a prototype implementation of PCH based on token caching.
...
llvm-svn: 57863
2008-10-21 00:54:44 +00:00
Daniel Dunbar
33d29b3eae
Add --disable-free flag to clang.
...
- Disables the freeing of the ASTContext and the TranslationUnit
after parsing & sema.
- Primarily for timing the impact on -fsyntax-only timings.
llvm-svn: 57643
2008-10-16 16:54:18 +00:00
Chris Lattner
1782da2f84
Add a new -rewrite-test option, which is basically a
...
playground to experiment with some new rewriter approaches. For now
it is probably the most complex version of 'cat' ever invented.
llvm-svn: 57406
2008-10-12 05:29:20 +00:00
Chris Lattner
fc7d4a3bd2
Add a new -dump-raw-tokens option, which allows us to see raw tokens.
...
Rename -dumptokens to -dump-tokens.
llvm-svn: 57405
2008-10-12 05:03:36 +00:00
Daniel Dunbar
faa4f50b71
Disable blocks support in C++ mode.
...
llvm-svn: 57334
2008-10-10 00:20:52 +00:00
Daniel Dunbar
374b8b4269
Allow -verify to be used with -rewrite-macros.
...
llvm-svn: 57093
2008-10-05 01:38:39 +00:00
Daniel Dunbar
e773d5ff16
Set exit code properly on "Unexpected program action".
...
llvm-svn: 57080
2008-10-04 23:42:49 +00:00
Daniel Dunbar
d03c02873a
(llvm up) If the target triple is unspecified, automatically set the
...
OS version part to that of the host on darwin.
llvm-svn: 56943
2008-10-02 01:21:33 +00:00
Daniel Dunbar
4dd154663e
Drop code to validate OS part of target triple on darwin, too fragile.
...
llvm-svn: 56941
2008-10-02 00:26:24 +00:00
Daniel Dunbar
106ab3bb42
Fix help for --suppress-system-warnings
...
llvm-svn: 56878
2008-09-30 20:49:53 +00:00
Chris Lattner
97d749464d
Handle minor version numbers in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
...
like "10.3.9"
llvm-svn: 56873
2008-09-30 20:30:12 +00:00
Chris Lattner
b5c15e8228
Finish handling of -mmacosx-version-min. If you now do something like:
...
clang -mmacosx-version-min=10.4.9 ...
you'll end up with a target triple like "i686-apple-darwin8.9".
llvm-svn: 56871
2008-09-30 20:16:56 +00:00
Chris Lattner
29c54dd6b9
start handling 'mmacosx-version-min', this is not complete yet.
...
llvm-svn: 56828
2008-09-30 01:13:12 +00:00
Steve Naroff
9779e92fa4
Add driver support for invoking block rewriter.
...
Also tweaked the create function to take an explicit output file.
llvm-svn: 56305
2008-09-18 14:10:13 +00:00
Daniel Dunbar
84b70f7f0f
Add --suppress-system-warnings (on by default, use =0 to disable)
...
- For investigating warnings in system headers / builtins.
- Currently also enables the behavior that allows silent redefinition
of types in system headers. Conceptually these are separate but I
didn't feel it was worth two options (or changing LangOptions).
llvm-svn: 56163
2008-09-12 18:10:20 +00:00
Argyrios Kyrtzidis
e7092bafc2
LangOptions.C99 should be false in C++.
...
llvm-svn: 56092
2008-09-11 04:21:06 +00:00
Ted Kremenek
b44763456c
Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' is
...
specified, or -std is set to a conforming mode.
llvm-svn: 55738
2008-09-03 21:22:16 +00:00
Ted Kremenek
d461d7ad7e
Added Ubigraph visualization for the static analyzer (this is pretty alpha quality).
...
llvm-svn: 55442
2008-08-27 22:31:43 +00:00
Zhongxing Xu
9470a96b18
Moved HTMLDiagnostics to lib/Driver.
...
llvm-svn: 55274
2008-08-24 02:33:36 +00:00
Daniel Dunbar
b8767ac183
Add TargetInfo::useNeXTRuntimeAsDefault
...
- Used to autoselect runtime when neither -fnext-runtime nor
-fgnu-runtime is specified.
- Default impl is false, all darwin targets set it to true.
llvm-svn: 55231
2008-08-23 08:43:39 +00:00
Nico Weber
ed9b4100a8
Move most of HeaderSearch initialization to libDriver.
...
For example, adding the default system include paths in clients is now as
simple as
InitHeaderSearch init(headers);
init.AddDefaultSystemIncludePaths(langopts);
init.Realize();
llvm-svn: 55174
2008-08-22 09:25:22 +00:00
Daniel Dunbar
3ad53483fb
Add LangOptions::NeXTRuntime.
...
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.
Emit NeXT OBJC_IMAGE_INFO marker.
llvm-svn: 54651
2008-08-11 21:35:06 +00:00
Daniel Dunbar
fb3043d627
Add -fexceptions to Driver
...
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.
Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.
llvm-svn: 54643
2008-08-11 17:36:14 +00:00
Daniel Dunbar
221fa94e40
More #include cleaning
...
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation
llvm-svn: 54627
2008-08-11 04:54:23 +00:00
Nico Weber
4c3116437c
* Remove isInSystemHeader() from DiagClient, move it to SourceManager
...
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic
This fixes the following problems:
* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed
llvm-svn: 54620
2008-08-10 19:59:06 +00:00
Ted Kremenek
dcb5e38927
ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client.
...
The motivation is that clients may either:
(a) query the ASTConsumer object after AST parsing to collect data/etc.
(b) reuse the ASTConsumer.
llvm-svn: 54502
2008-08-08 02:46:37 +00:00
Ted Kremenek
59f3553392
Remove unneeded #includes.
...
llvm-svn: 54478
2008-08-07 18:14:04 +00:00
Ted Kremenek
6b515b5b34
Micro cleanups.
...
llvm-svn: 54477
2008-08-07 18:13:12 +00:00
Ted Kremenek
31691ae862
Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.
...
llvm-svn: 54472
2008-08-07 17:49:57 +00:00
Nico Weber
b5fc3c300a
add a libDriver, for now only move the text diangostics stuff from Driver to there
...
llvm-svn: 54383
2008-08-05 23:33:20 +00:00
Ted Kremenek
2c674f6dbb
Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.
...
llvm-svn: 54364
2008-08-05 18:50:11 +00:00