Daniel Dunbar
6c17bfd99b
Driver: Cleanup temporary/result files.
...
llvm-svn: 67248
2009-03-18 22:16:03 +00:00
Ted Kremenek
b36e01d87e
Fix crash reported in <rdar://problem/6695527>. We now have
...
SVal::GetRValueSymbolVal do the checking if we can symbolicate a type instead of
having BasicStoreManager do it (which wasn't always doing the check
consistently). Having this check in SVal::GetRValueSymbolVal keeps the check in
one centralized place.
llvm-svn: 67245
2009-03-18 22:10:22 +00:00
Daniel Dunbar
6f66877ebf
Driver: Lookup program names using llvm::sys::Program::FindProgramByName
...
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.
Also, have GCC tools lookup gcc program path.
llvm-svn: 67243
2009-03-18 21:34:08 +00:00
Mike Stump
fc17674d6b
The eventual name of this will be clang, might as well start now.
...
llvm-svn: 67241
2009-03-18 21:19:11 +00:00
Chris Lattner
d14705b9b4
silence some errors that should not apply to .S files on code like:
...
''
'
'
llvm-svn: 67237
2009-03-18 21:10:12 +00:00
Chris Lattner
2d17ab783b
when preprocessing a .S file, unknown directives should just be passed through,
...
and the token after the # should be expanded if it is not a valid directive.
This allows us to transform things like:
#define FOO BAR
# FOO
into # BAR, even though FOO is not normally expanded for directives.
This should fix PR3833
llvm-svn: 67236
2009-03-18 21:00:25 +00:00
Chris Lattner
2534324a4e
properly form a full token for # before calling HandleDirective.
...
llvm-svn: 67235
2009-03-18 20:58:27 +00:00
Chris Lattner
5eb8ae2453
This is not considered a preprocessor directive in .S files:
...
# 4
llvm-svn: 67233
2009-03-18 20:41:10 +00:00
Chris Lattner
5def81401f
constructs like:
...
#define Y X ## .
Y
are ok in .S files.
llvm-svn: 67231
2009-03-18 20:31:57 +00:00
Daniel Dunbar
68b01a03ba
Driver: Support ToolChain specific path lists to search for files and
...
programs.
llvm-svn: 67229
2009-03-18 20:26:19 +00:00
Gabor Greif
8c97d18445
incorporate review comment (about the optimization when we have a non-typedependent expression)
...
llvm-svn: 67226
2009-03-18 20:12:58 +00:00
Mike Stump
25d1dc2a20
Move generated file to ObjDir.
...
llvm-svn: 67225
2009-03-18 20:12:50 +00:00
Daniel Dunbar
c230443178
PR3835: Interaction with ABI structure passing can inhibit
...
readnone/readonly attributes.
llvm-svn: 67224
2009-03-18 19:51:01 +00:00
Daniel Dunbar
e627c1cc0f
Driver: Construct temporary file names.
...
- This is still suboptimal, but should at least be workable.
llvm-svn: 67223
2009-03-18 19:34:39 +00:00
Mike Stump
1dca7c0061
Add revision information.
...
llvm-svn: 67220
2009-03-18 18:45:55 +00:00
Chris Lattner
ab17fb2c98
fix the more complex cases by actually codegen'ing the right expr :)
...
llvm-svn: 67219
2009-03-18 18:30:44 +00:00
Chris Lattner
28bcf1a429
add codegen support for casting an element to a union.
...
There are some more complex cases (_Complex and structs)
that I'm still working on.
llvm-svn: 67218
2009-03-18 18:28:57 +00:00
Daniel Dunbar
d175d9753b
Driver: Don't warn about unused arguments if there are Driver errors
...
(brings code in line with diagnostic.
llvm-svn: 67217
2009-03-18 18:03:46 +00:00
Gabor Greif
3db2902f02
simplify logic, isInvalid check is redundant
...
llvm-svn: 67216
2009-03-18 17:53:25 +00:00
Mike Stump
367fee6664
Be sure to not add weak import, if we are ignoring it.
...
llvm-svn: 67214
2009-03-18 17:39:31 +00:00
Mike Stump
bc7d67ce08
Add codegen support for aggregate BlockDeclRefExprs.
...
llvm-svn: 67207
2009-03-18 15:54:29 +00:00
Mike Stump
3b79d59be7
Fix URL trimming for version information.
...
llvm-svn: 67206
2009-03-18 15:19:35 +00:00
Mike Stump
38cae30095
Ignore weak import on properties.
...
llvm-svn: 67205
2009-03-18 15:05:17 +00:00
Mike Stump
02537142c1
Improve version number.
...
llvm-svn: 67204
2009-03-18 14:00:02 +00:00
Daniel Dunbar
a2aedc6943
Driver: Port Clang argument translation.
...
llvm-svn: 67193
2009-03-18 10:01:51 +00:00
Daniel Dunbar
e6c8319943
Driver: Bug fix, derived .gch names sometimes started with "/".
...
llvm-svn: 67192
2009-03-18 09:58:30 +00:00
Daniel Dunbar
7591f29f7c
Driver: Add argument translation utilities to ArgList.
...
- Support things like telling which -ffoo -fno-foo option won, and
forwarding all arguments matching a certain set of options to the
tool.
llvm-svn: 67189
2009-03-18 09:29:36 +00:00
Daniel Dunbar
a3246a0638
Driver: Lift out common GCC tool and implement generic GCC tool
...
argument translation.
Also, stub out clang tool implementation a bit more.
llvm-svn: 67185
2009-03-18 08:07:30 +00:00
Daniel Dunbar
dcd05482bd
Driver: Add assert and FIXME; arguments which act as linker inputs
...
(e.g., -filelist) are currently broken.
llvm-svn: 67183
2009-03-18 08:02:40 +00:00
Daniel Dunbar
8eba365d36
Driver: Provide Arg::render implementations.
...
llvm-svn: 67182
2009-03-18 08:01:48 +00:00
Daniel Dunbar
4b6058e33a
Driver: Add "d" flag to Options.def for options which are completely
...
handled by driver.
- This is not very precise, we use it to drive the "forward-to-gcc"
predicate, when trying to talk to a generic gcc tool.
- Slightly better than what ccc was doing, and should be good
enough. Platforms which want a robust driver should implement a
proper tool chain.
llvm-svn: 67181
2009-03-18 08:01:15 +00:00
Daniel Dunbar
04c4c2c3db
Driver: ConstructJob also needs to know the destination (where to put
...
its commands).
llvm-svn: 67179
2009-03-18 07:06:02 +00:00
Daniel Dunbar
3beceaf7f1
Driver: Print version on stderr to match [gc]cc.
...
llvm-svn: 67178
2009-03-18 06:51:03 +00:00
Daniel Dunbar
0928b3125c
Driver: Implement -### (hard to tell, since we don't actually
...
construct any jobs).
llvm-svn: 67177
2009-03-18 06:49:39 +00:00
Daniel Dunbar
2b4bda8073
Driver: Claim inputs when we bind the InputAction.
...
llvm-svn: 67174
2009-03-18 06:21:12 +00:00
Daniel Dunbar
e4197f6203
Driver: Rename Command::Argv to Command::Arguments to make it clearer
...
that this does not include the implicit first argument (the executable
name).
llvm-svn: 67172
2009-03-18 06:13:37 +00:00
Daniel Dunbar
bcd775b436
Driver: Don't claim inputs when pipelining, a tool should eventually
...
claim these.
llvm-svn: 67171
2009-03-18 06:09:38 +00:00
Daniel Dunbar
0450e6dc4c
Driver: Add a dash of const.
...
llvm-svn: 67170
2009-03-18 06:07:59 +00:00
Daniel Dunbar
1a093d2049
Driver: Stub out Tool::ConstructJob.
...
llvm-svn: 67169
2009-03-18 06:00:36 +00:00
Daniel Dunbar
aabaac4743
Driver: Fix Compilation::getArgsForToolChain, local variable was
...
shadowing member.
llvm-svn: 67167
2009-03-18 05:58:45 +00:00
Daniel Dunbar
1197adcbf1
Driver: Add two normalizations for powerpc.
...
- PR3830
llvm-svn: 67166
2009-03-18 04:41:46 +00:00
Chris Lattner
c2a0b97950
fix PR3809, codegen for inc/dec of function pointers.
...
llvm-svn: 67165
2009-03-18 04:25:13 +00:00
Chris Lattner
63d06ab65a
teach codegen to handle noop casts as lvalues.
...
llvm-svn: 67164
2009-03-18 04:02:57 +00:00
Daniel Dunbar
dc78bd9f79
Fix -E mismatch; an identifier followed by a numeric constant does not
...
require a space (to avoid concatenation) if the numeric constant had a
leading period.
- PR3819.
llvm-svn: 67163
2009-03-18 03:32:24 +00:00
Daniel Dunbar
eb843bedf9
Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.
...
llvm-svn: 67162
2009-03-18 03:13:20 +00:00
Daniel Dunbar
896cb66166
Driver: I was too hasty in free'ing Actions, we sometimes share
...
Actions so a simple tree traversal isn't quite good enough. Leaving a
FIXME for now.
llvm-svn: 67161
2009-03-18 03:02:22 +00:00
Daniel Dunbar
06d918c2f4
Driver: Initialize Arg::Claimed
...
llvm-svn: 67160
2009-03-18 02:57:50 +00:00
Daniel Dunbar
f0eddb8510
Driver: Move actions into Compilation, and construct the compilation
...
earlier.
- This gives us a simple ownership model, and allows clients access
to more information should they ever want it.
- We now free Actions correctly.
llvm-svn: 67158
2009-03-18 02:55:38 +00:00
Daniel Dunbar
d00978bc0d
Driver: Add test for binding of precompile; exposed bug due to my
...
flawed idea that llvm::sys::Path::getBasename was a version of
basename().
llvm-svn: 67153
2009-03-18 02:00:31 +00:00
Zhongxing Xu
17299e6172
Use a work list to recursively build up the subregion mapping, and mark live
...
var region roots.
llvm-svn: 67152
2009-03-18 01:54:31 +00:00
Daniel Dunbar
338d74898c
Driver: Implement JoinedAndSeparateArg::getValue and add parsing test
...
case.
llvm-svn: 67151
2009-03-18 01:48:37 +00:00
Daniel Dunbar
6965c2b113
Driver: UnknownHostInfo was always returning 0.
...
llvm-svn: 67150
2009-03-18 01:39:08 +00:00
Daniel Dunbar
2608c548b5
Driver: Use PrettyStackTrace.
...
llvm-svn: 67149
2009-03-18 01:38:48 +00:00
Gabor Greif
68cfd78375
cleanup instantiation code, tighten testcase
...
llvm-svn: 67148
2009-03-18 01:16:08 +00:00
Daniel Dunbar
0160172228
Driver: Release Host, ToolChain, and Tool implementations.
...
llvm-svn: 67146
2009-03-18 01:09:40 +00:00
Gabor Greif
8af7837b08
instantiate ?: expressions
...
llvm-svn: 67145
2009-03-18 00:55:04 +00:00
Douglas Gregor
6bfde496ee
The scope representation can now be either a DeclContext pointer or a
...
Type pointer. This allows our nested-name-specifiers to retain more
information about the actual spelling (e.g., which typedef did the
user name, or what exact template arguments were used in the
template-id?). It will also allow us to have dependent
nested-name-specifiers that don't map to any DeclContext.
llvm-svn: 67140
2009-03-18 00:36:05 +00:00
Daniel Dunbar
389fe1f563
Driver: Add test case for -ccc-clang-archs (which, it turns out, was
...
inverted).
llvm-svn: 67135
2009-03-18 00:12:31 +00:00
Chris Lattner
441914ea5b
pull a nested conditional + comment out into its own variable,
...
no functionality change.
llvm-svn: 67128
2009-03-17 23:17:04 +00:00
Chris Lattner
9363e3106e
don't crash when sentinel attribute is used on function without a prototype,
...
discovered as part of PR3817
llvm-svn: 67127
2009-03-17 23:03:47 +00:00
Chris Lattner
7440dcb53e
Fix Type::getDesugaredType() to remove all direct sugar on
...
a type. For example, if we have a typedef of a typeof of
int, we strip all the say down to int. This allows us to
simplify the getAs* methods, and is the first step towards
fixing PR3817
llvm-svn: 67126
2009-03-17 22:51:02 +00:00
Daniel Dunbar
b39cc52eda
Driver: Add -ccc-print-bindings option (for testing); the Python
...
driver has no corresponding option.
llvm-svn: 67125
2009-03-17 22:47:06 +00:00
Daniel Dunbar
82116f8df4
Driver: Add name to Tool (for testing/debugging) and move GCC_* tools
...
into gcc:: namespace.
llvm-svn: 67120
2009-03-17 22:45:24 +00:00
Ted Kremenek
211094d793
Stub out some code for support for NSDeallocateObject. This is enabled yet until
...
we resolve the semantics of this function when GC is enabled.
llvm-svn: 67116
2009-03-17 22:43:44 +00:00
Chris Lattner
f568f8c889
GCC 4.0 isn't happy with VISIBILITY_HIDDEN on a namespace.
...
llvm-svn: 67112
2009-03-17 22:24:01 +00:00
Daniel Dunbar
15abb2ee0e
Driver: GCC 4.0 isn't happy with VISIBILITY_HIDDEN on a namespace.
...
llvm-svn: 67110
2009-03-17 22:18:43 +00:00
Daniel Dunbar
5903d8c08a
Driver: Stub out generic GCC tool selection (missed a file)
...
llvm-svn: 67109
2009-03-17 22:07:58 +00:00
Daniel Dunbar
04cb029e0b
Driver: Stub out generic GCC tool selection.
...
llvm-svn: 67108
2009-03-17 22:07:31 +00:00
Daniel Dunbar
0a248bb5c2
Driver: Stub out generic GCC tool chain implementation.
...
llvm-svn: 67107
2009-03-17 21:38:00 +00:00
Daniel Dunbar
71bdee6ea1
Driver: Make sure to get the default arch name from the tool chain, not the
...
host; the toolchain may differ based on command line arguments.
llvm-svn: 67106
2009-03-17 21:29:52 +00:00
Daniel Dunbar
7a70c5ddbf
Driver: Pass HostInfo reference into ToolChain.
...
llvm-svn: 67105
2009-03-17 21:21:26 +00:00
Douglas Gregor
d7e7a51797
Refactor instantiation of declarations within a template into a much
...
cleaner visitor framework.
Added a visitor for declarations, which is quite similar to the
visitor for statatements.
llvm-svn: 67104
2009-03-17 21:15:40 +00:00
Daniel Dunbar
52e0c70868
Driver: Pass Driver reference down into Host info, which will need it
...
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).
llvm-svn: 67102
2009-03-17 20:45:45 +00:00
Daniel Dunbar
62ca7d23ce
Driver: Fix typo ArgList destructor.
...
llvm-svn: 67101
2009-03-17 20:44:29 +00:00
Ted Kremenek
ea072e3cae
retain/release checker: Add support for reasoning about -dealloc.
...
llvm-svn: 67094
2009-03-17 19:42:23 +00:00
Douglas Gregor
954f6b27da
Implement instantiation of enums within class templates. This isn't
...
quite as great as it sounds, because, while we can refer to the
enumerator values outside the template, e.g.,
adder<long, 3, 4>::value
we can't yet refer to them with dependent names, so no Fibonacci
(yet).
InstantiateClassTemplateSpecialization is getting messy; next commit
will put it into a less-ugly state.
llvm-svn: 67092
2009-03-17 19:05:46 +00:00
Daniel Dunbar
b42a26c0a5
Driver: Hide HostInfo implementations.
...
- Also, normalize arch names a tad and stub out getToolChain
implementations.
llvm-svn: 67091
2009-03-17 19:00:50 +00:00
Daniel Dunbar
c1b70b2039
Driver: Add two option form of ArgList::getLastArg.
...
llvm-svn: 67090
2009-03-17 18:51:42 +00:00
Daniel Dunbar
7a178a40a1
Driver: Add logic for computing where to put job outputs (pipe,
...
temporary file, user provided name, derived name).
llvm-svn: 67088
2009-03-17 17:53:55 +00:00
Daniel Dunbar
527e2b3f8c
Add ArgList::MakeArgString and make ArgList::Make* const.
...
- Slightly strange, but the idea is that the ArgList data structure
is primarily a list of arguments; we want to allow clients to still
add argument strings to an ArgList to avoid worrying about string
lifetimes (or unnecessary string copying).
llvm-svn: 67086
2009-03-17 17:51:18 +00:00
Gabor Greif
31a082fd7a
typo
...
llvm-svn: 67081
2009-03-17 11:39:38 +00:00
Anders Carlsson
e73e3ecc04
Initialize the cleanup.dst variable if necessary. Fixes PR3789.
...
llvm-svn: 67075
2009-03-17 05:53:35 +00:00
Daniel Dunbar
6865a9e975
Fix unused variable warning in -Asserts mode.
...
llvm-svn: 67073
2009-03-17 04:12:06 +00:00
Anders Carlsson
4916c466da
Handle ImplicitCastExprs when instantiating templates.
...
llvm-svn: 67063
2009-03-17 00:28:02 +00:00
Devang Patel
bd93351c42
Fix struct field's debug info.
...
llvm-svn: 67062
2009-03-16 23:47:53 +00:00
Douglas Gregor
9fa1ab7d0c
Fix a problem noticed by Anders, where we were creating
...
IntegerLiterals during instantiation when we should be creating either
a boolean literal (CXXBoolLiteralExpr) or a character literal
(CharacterLiteral).
llvm-svn: 67061
2009-03-16 23:35:25 +00:00
Sebastian Redl
0f8b23f71f
Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.
...
llvm-svn: 67059
2009-03-16 23:22:08 +00:00
Douglas Gregor
23d75bb326
Build system changes to use TableGen to generate the various
...
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:
- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.
I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.
llvm-svn: 67058
2009-03-16 23:06:59 +00:00
Anders Carlsson
6caa9dd693
Check signedness of bitfield sizes.
...
llvm-svn: 67045
2009-03-16 18:19:21 +00:00
Daniel Dunbar
e75d834c7c
Driver: Implement majority tool binding logic.
...
- Still need code for determining proper output location.
- Doesn't work yet, of course, as the host isn't providing real
tool chains.
- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.
llvm-svn: 67038
2009-03-16 06:56:51 +00:00
Daniel Dunbar
3ce436d229
Driver: Migrate some data into the Compilation; after pipelining
...
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).
llvm-svn: 67037
2009-03-16 06:42:30 +00:00
Daniel Dunbar
9e2136d930
Driver: Sketch Tool and ToolChain classes.
...
llvm-svn: 67036
2009-03-16 05:25:36 +00:00
Sebastian Redl
ed0f3b021e
Parser support for rvalue references.
...
llvm-svn: 67033
2009-03-15 22:02:01 +00:00
Anders Carlsson
5bd30395b9
(Hopefully) instantiate dependent array types correctly.
...
llvm-svn: 67032
2009-03-15 20:12:13 +00:00
Anders Carlsson
27de6a5e91
Handle static_asserts when instantiating structs.
...
llvm-svn: 67031
2009-03-15 18:44:04 +00:00
Anders Carlsson
a39058118b
Add the ability to clone integer and string literals. Use it when instantiating template expressions.
...
llvm-svn: 67030
2009-03-15 18:34:13 +00:00
Sebastian Redl
6d4256c3c1
Convert a bunch of actions to smart pointers, and also bring PrintParserCallbacks a bit more in line with reality.
...
llvm-svn: 67029
2009-03-15 17:47:39 +00:00
Douglas Gregor
afd7c9c855
Fix bitfield-instantiation ownership bug noticed by Anders
...
llvm-svn: 67028
2009-03-15 17:43:26 +00:00
Anders Carlsson
78e2bc0328
Make sure to release the expressions.
...
llvm-svn: 67027
2009-03-15 17:35:16 +00:00
Daniel Dunbar
27a08fab6b
Add note on theoretical IRgen improvement.
...
llvm-svn: 67024
2009-03-15 06:39:56 +00:00