Eli Friedman
aa27a87ab3
Misc minor fixes for clang for the Windows target.
...
llvm-svn: 73050
2009-06-08 06:11:14 +00:00
Devang Patel
9e24386c65
Set function Attribute::NoImplicitFloat appropriately.
...
llvm-svn: 72961
2009-06-05 22:05:48 +00:00
Eli Friedman
6be4b393b9
Add -fsigned-char option to clang-cc.
...
llvm-svn: 72929
2009-06-05 07:12:17 +00:00
Devang Patel
6e467b1a46
Set function attribute llvm::Attribute::NoRedZone appropriately.
...
llvm-svn: 72902
2009-06-04 23:32:02 +00:00
Torok Edwin
a1581e1a7a
forward -fno-color-diagnostics to clang-cc.
...
llvm-svn: 72856
2009-06-04 07:27:53 +00:00
Torok Edwin
c91b6e0ff8
Add ANSI color support for clang.
...
llvm-svn: 72855
2009-06-04 07:18:23 +00:00
Daniel Dunbar
4b665ebb01
Add clang-cc support for -disable-llvm-optzns.
...
- Avoids running any LLVM optimizations, even at -O2, etc., while still keeping
any language changes these optimizations imply.
llvm-svn: 72742
2009-06-02 22:07:45 +00:00
Douglas Gregor
278f52ec29
Refactor and clean up the AST printer, so that it uses a DeclVisitor,
...
walks through DeclContexts properly, and prints more of the
information available in the AST. The functionality is still available
via -ast-print, -ast-dump, etc., and also via the new member functions
Decl::dump() and Decl::print().
llvm-svn: 72597
2009-05-30 00:08:05 +00:00
Daniel Dunbar
044a702f2f
Move clang-cc's -v output to the start (vs. end) of compilation, and change
...
clang -> clang-cc to be less confusing.
llvm-svn: 72527
2009-05-28 16:37:33 +00:00
Fariborz Jahanian
a4404f21d1
This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
...
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.
llvm-svn: 72275
2009-05-22 20:17:16 +00:00
Douglas Gregor
7f5601e55f
AST XML dump, from Olaf Krzikalla!
...
llvm-svn: 72224
2009-05-21 20:55:50 +00:00
Eli Friedman
5b5bd90a21
Move AnalysisConsumer.h and Analyses.def from tools/clang-cc to
...
include/clang/Frontend, and move AnalysisConsumer.cpp from
tools/clang-cc to lib/Frontend.
llvm-svn: 72135
2009-05-19 21:10:40 +00:00
Eli Friedman
45966b4671
Remove the -arch option from clang-cc: for all practical purposes, it's
...
redundant with -triple.
llvm-svn: 72108
2009-05-19 11:12:40 +00:00
Eli Friedman
996ef2f7b6
Move analysis command-line options out of AnalysisConsumer.cpp into
...
clang-cc.cpp.
With this commit, all of the clang-cc command-line options are defined
in clang-cc.cpp.
llvm-svn: 72107
2009-05-19 10:18:02 +00:00
Eli Friedman
e15ecf04a4
CMake updates for r72099; untested, so please tell me if there are any
...
issues.
llvm-svn: 72100
2009-05-19 04:21:30 +00:00
Eli Friedman
16b7b6f511
Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
...
files to lib/Frontend.
llvm-svn: 72099
2009-05-19 04:14:29 +00:00
Eli Friedman
2bd0f3964c
Move CreateAnalysisConsumer into a separate header AnalysisConsumer.h.
...
Start moving things around in the direction of refactoring the
command-line options out of AnalysisConsumer.cpp.
llvm-svn: 72097
2009-05-19 03:57:28 +00:00
Eli Friedman
33cd03cd89
Move the options for dependency file generation from DependencyFile.cpp
...
to clang-cc.cpp. Also, rename CreateDependencyFileGen to
AttachDependencyFileGen, and make it take a raw_ostream rather than
opening a file itself.
llvm-svn: 72096
2009-05-19 03:35:57 +00:00
Eli Friedman
6af494b426
Move options for -E mode from PrintPreprocessedOutput.cpp to
...
clang-cc.cpp.
llvm-svn: 72095
2009-05-19 03:06:47 +00:00
Eli Friedman
26c672b490
Refactor -dM mode out of the main routine for -E handling.
...
llvm-svn: 72090
2009-05-19 01:32:34 +00:00
Eli Friedman
42279c0f07
Move the warning options from Warnings.cpp to clang-cc.cpp.
...
llvm-svn: 72089
2009-05-19 01:17:04 +00:00
Eli Friedman
fcb57d5b6a
Switch some utilities in clang-cc to take a stream instead of a
...
filename (or unconditionally using stdout).
llvm-svn: 72085
2009-05-19 01:02:07 +00:00
Eli Friedman
351fa4b1b2
Attempted CMake build fixes for r72060; this is untested, so please tell
...
me if there are any issues.
llvm-svn: 72063
2009-05-18 23:06:15 +00:00
Eli Friedman
2b6d281e11
Build fixes for r72060; sorry for any inconvenience.
...
llvm-svn: 72062
2009-05-18 23:02:01 +00:00
Eli Friedman
9f30fc33d9
Move ASTConsumers.h to include/clang/Frontend, and move the associated
...
.cpp files to lib/Frontend. (As proposed on cfe-dev.)
llvm-svn: 72060
2009-05-18 22:50:54 +00:00
Eli Friedman
f22439a709
Move the Wno-rewrite-macros option out of RewriteObjC.cpp in prepration
...
for moving ASTConsumers.h to include/clang/Frontend.
llvm-svn: 72059
2009-05-18 22:39:16 +00:00
Eli Friedman
a63ab2dc76
Rename the factory function for the ObjC rewriter to something sane.
...
llvm-svn: 72055
2009-05-18 22:29:17 +00:00
Eli Friedman
e5594d724b
Move AnalysisConsumer out of ASTConsumers.h in preparation for moving
...
ASTConsumers.h to include/clang/Frontend.
llvm-svn: 72054
2009-05-18 22:25:55 +00:00
Eli Friedman
94cf21e282
Refactor ASTConsumers to take a raw_ostream instead of a filename where
...
appropriate. There shouldn't be any significant functionality change.
llvm-svn: 72052
2009-05-18 22:20:00 +00:00
Eli Friedman
174c310967
Remove unused parameter.
...
llvm-svn: 71996
2009-05-18 07:39:39 +00:00
Eli Friedman
07cdffc295
Add some comments to ASTConsumers.h describing what the different
...
ASTConsumers actually do.
llvm-svn: 71992
2009-05-18 01:16:21 +00:00
Anders Carlsson
ee13926fbe
Make ActOnWhileStmt take a FullExprArg for the condition expr.
...
llvm-svn: 71990
2009-05-17 21:22:26 +00:00
Anders Carlsson
24824e5009
Make ActOnExprStmt take a FullExprArg.
...
llvm-svn: 71989
2009-05-17 21:11:30 +00:00
Anders Carlsson
5262746c28
Add the FullExprArg wrapper and use it for if statement conditions.
...
llvm-svn: 71982
2009-05-17 18:26:53 +00:00
Eli Friedman
8f1d33e218
A couple of tweaks to make -ast-print produce code that's closer to
...
valid C code.
llvm-svn: 71971
2009-05-17 01:05:34 +00:00
Mike Stump
6814d1c126
Implement a FIXME, we now pass in the locations of the braces for enums.
...
llvm-svn: 71930
2009-05-16 07:06:02 +00:00
Anders Carlsson
5879fbd933
Disable access control by default. It can be enabled with the -faccess-control option. When we have better support for it, we can enable it by default again.
...
llvm-svn: 71706
2009-05-13 19:49:53 +00:00
Chris Lattner
939952c19c
remove the obsolete -fprint-source-range-info option
...
llvm-svn: 71675
2009-05-13 17:08:18 +00:00
Douglas Gregor
45fe0364aa
Make precompiled headers work with -E. When we're only preprocessing
...
(with -E), we turn the PCH include into an implicit include of the
file from which the PCH file was generated.
llvm-svn: 71534
2009-05-12 01:31:05 +00:00
Douglas Gregor
ad1a1c3982
Move terminal-width computation over to llvm::sys. Update to LLVM
...
r71448 required. Fixes PR 4148 and PR 4183.
llvm-svn: 71450
2009-05-11 18:06:49 +00:00
Daniel Dunbar
81ded69511
Remove -fobjc-tight-layout, seems to work!
...
llvm-svn: 71184
2009-05-07 21:58:26 +00:00
Ted Kremenek
094bc31000
Fix <rdar://problem/6848739>. When using -analyze, -Werror has no effect.
...
llvm-svn: 71172
2009-05-07 19:02:53 +00:00
Daniel Dunbar
908a66dc9b
If stderr isn't a terminal, don't try to guess the terminal width or
...
look at COLUMNS.
llvm-svn: 71120
2009-05-06 21:28:42 +00:00
Daniel Dunbar
bb36aed06b
More x86 target feature support.
...
- Apologies for the extremely gross code duplication, I want to get
this working and then decide how to get this information out of the
back end.
- This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc
doesn't distinguish them?
- -msse, etc. now properly disable/enable related features.
- Don't always define __SSE3__...
- The main missing functionality bit here is that we don't initialize
the features based on the CPU for all -march options.
llvm-svn: 71117
2009-05-06 21:07:50 +00:00
Chris Lattner
37ac812f9c
daniel is buggy :)
...
llvm-svn: 71065
2009-05-06 04:38:30 +00:00
Daniel Dunbar
67dba989bb
Add missing include.
...
llvm-svn: 71063
2009-05-06 04:07:06 +00:00
Daniel Dunbar
bc45101e09
Cleanup some FIXMEs.
...
llvm-svn: 71062
2009-05-06 03:48:17 +00:00
Daniel Dunbar
4dbaaa6f43
Improve handling of (X86) target features.
...
- This is a WIP...
- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).
Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name
In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.
This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.
llvm-svn: 71061
2009-05-06 03:16:41 +00:00
Daniel Dunbar
c4bb4274b6
Enable tight Objective-C interface layout unconditionally.
...
- I will remove the flag when I'm comfortable there is no fallout
from this.
llvm-svn: 70993
2009-05-05 18:52:50 +00:00
Daniel Dunbar
e993ba6fca
Add -fobjc-tight-layout.
...
- This implements gcc style Objective-C interface layout (I
think). Currently it is always off, there is no functionality
change unless this is passed.
For the curious, the deal is that gcc lays out the fields of a
subclass as if they were part of the superclass. That is, the
subclass fields immediately follow the super class fields instead
of being padded to the alignment of the superclass structure.
- Currently gcc uses the tight layout in 32-bit and 64-bit modes, and
llvm-gcc uses it in 32-bit only, for reasons which aren't clear
yet. We probably want to switch to matching gcc, once this makes it
through testing... my hope is that we can also fix llvm-gcc in
order to maintain compatibility between the compilers.
llvm-svn: 70827
2009-05-04 05:16:21 +00:00