Anders Carlsson
2c1ec6d5f7
Add sema checking for compound literal expressions.
...
llvm-svn: 44605
2007-12-05 07:24:19 +00:00
Anders Carlsson
e8ee04c0bc
Implement codegen for builtin infinity functions.
...
llvm-svn: 44604
2007-12-05 07:22:48 +00:00
Anders Carlsson
cbdb6f5b5d
Revert DidWarn change - It won't catch all cases anyway and GCC warns for every excess element. Maybe later we can add back the limit and make it smarter.
...
llvm-svn: 44603
2007-12-05 04:57:06 +00:00
Steve Naroff
2644aaf537
Recognize CompoundLiteralExpr's as valid lvalue's.
...
Also updated a FIXME in Sema::CheckInitializer()...
llvm-svn: 44602
2007-12-05 04:00:10 +00:00
Ted Kremenek
90a7c12bb4
Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.
...
llvm-svn: 44593
2007-12-05 00:43:08 +00:00
Ted Kremenek
166e505d27
Added serialization support of SourceManager to the clang driver.
...
llvm-svn: 44592
2007-12-05 00:26:13 +00:00
Ted Kremenek
e634142388
Renamed SourceManager::Read to SourceManager::CreateAndRegister.
...
Now sourcemanager deserializer automatically self-registers itself with
the deserializer.
llvm-svn: 44591
2007-12-05 00:19:51 +00:00
Ted Kremenek
57f4c00241
Implemented initial serialization support for SourceManager.
...
llvm-svn: 44590
2007-12-05 00:14:18 +00:00
Steve Naroff
0317aeb4b6
Add the definition of objc_super...
...
llvm-svn: 44588
2007-12-04 23:59:30 +00:00
Ted Kremenek
6ca076cb7a
Removed serialization of FileEntry and DirectoryEntry. This objects will
...
now be lazily recreated upon deserialization.
llvm-svn: 44585
2007-12-04 22:42:20 +00:00
Fariborz Jahanian
1e34ce1045
Type-cast initializers for "struct objc_super" parameter to avoid warning.
...
llvm-svn: 44583
2007-12-04 22:32:58 +00:00
Fariborz Jahanian
22c278a216
Test case for my last patch.
...
llvm-svn: 44581
2007-12-04 21:48:54 +00:00
Fariborz Jahanian
31e1850694
Don't assert if objc.h not declared when rewriting.
...
llvm-svn: 44580
2007-12-04 21:47:40 +00:00
Ted Kremenek
c638952f59
Implemented serialization of SrcMgr::ContentCache.
...
llvm-svn: 44578
2007-12-04 19:39:02 +00:00
Fariborz Jahanian
f256b48bc7
Removed a "TODO" comment as objc1 runtime does not need to do the "TODO".
...
llvm-svn: 44577
2007-12-04 19:31:56 +00:00
Fariborz Jahanian
1f606a999e
Simplified setting up Method's scope before generating AST for its nody.
...
llvm-svn: 44576
2007-12-04 19:20:11 +00:00
Ted Kremenek
c6593c2c2e
Fixed a few more comments to change "FileInfo" to "ContentCache."
...
llvm-svn: 44574
2007-12-04 18:59:28 +00:00
Ted Kremenek
f7260b191c
Implemented serialization of FileEntry and DirectoryEntry.
...
llvm-svn: 44573
2007-12-04 18:21:35 +00:00
Ted Kremenek
0c2bea2909
Removed searching for "darwin" keyword in target triple. We don't really support
...
any alternative targets at this point other than "darwin," so we now default to
Darwin targets (for now).
llvm-svn: 44572
2007-12-04 17:07:35 +00:00
Ted Kremenek
bce8b49973
Removed IntrusiveSPtr. There are no clients of this class anymore, so it is
...
not needed, and it was never extensively tested. If we need an intrusive
reference-counting smart pointer, we can always import intrusive_ptr from
boost.
llvm-svn: 44571
2007-12-04 16:54:09 +00:00
Ted Kremenek
c8f444ff80
Implemented serialization of ObjCStringLiteral.
...
llvm-svn: 44568
2007-12-04 00:51:11 +00:00
Ted Kremenek
b8714c8ef1
Implemented serialization for ObjcAtThrowStmt.
...
llvm-svn: 44567
2007-12-04 00:40:49 +00:00
Ted Kremenek
98b3a71537
Implemented serialization of ObjcAtTryStmt.
...
llvm-svn: 44566
2007-12-04 00:38:30 +00:00
Ted Kremenek
ee695a3456
Implemented serialization for ObjcAtFinallyStmt.
...
llvm-svn: 44564
2007-12-04 00:32:22 +00:00
Ted Kremenek
0bf3e33dcc
Implemented serialization for ObjcAtCatchStmt.
...
llvm-svn: 44563
2007-12-04 00:28:54 +00:00
Ted Kremenek
9c26202c76
Fixed order of operands to strstr call.
...
llvm-svn: 44561
2007-12-03 23:25:59 +00:00
Ted Kremenek
eead4052e9
For target processing, on non-Darwin systems instead of using the host triple,
...
we default to "i386-apple-darwin". This is an interim solution.
Removed processing of "linux" triples from Targets.cpp, since we don't have
any sensical Linux target support (yet).
Cleaned up error processing of targets; added better diagnostics.
llvm-svn: 44560
2007-12-03 23:23:21 +00:00
Fariborz Jahanian
68c06b2d2c
Change <Objc/objc.h> to <objc/objc.h>
...
llvm-svn: 44556
2007-12-03 23:04:29 +00:00
Ted Kremenek
8e3a2a93aa
Implemented serialization of TargetInfo.
...
SerializationTest (subclass of ASTConsumer) now takes Diagnostics& in its ctor.
llvm-svn: 44555
2007-12-03 22:48:14 +00:00
Ted Kremenek
8cdc08ea49
Added some notes on the -triple and -arch options.
...
llvm-svn: 44554
2007-12-03 22:26:16 +00:00
Fariborz Jahanian
d0d2bd5089
Fixed a bug exposed by referencing an ivar field using component reference syntax.
...
llvm-svn: 44553
2007-12-03 22:25:42 +00:00
Ted Kremenek
68fcff9bfa
Few cleanups to patch 44551:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=44551
Removed debugging fprintfs for printing targets.
Implemented error messages when processing invalid targets.
llvm-svn: 44552
2007-12-03 22:11:31 +00:00
Ted Kremenek
b061554caa
Implemented initial support for "-triple" option to the clang driver. This
...
replaces the functionality previously provided by just "-arch" (which is still
supported but has different semantics).
The new behavior is as follows:
(1) If the user does not specify -triple:
(a) If no -arch options are specified, the target triple used is the host
triple (in llvm/Config/config.h).
(b) If one or more -arch's are specified (and no -triple), then there is
one triple for each -arch, where the specified arch is substituted
for the arch in the host triple. Example:
host triple = i686-apple-darwin9
command: clang -arch ppc -arch ppc64 ...
triples used: ppc-apple-darwin9 ppc64-apple-darwin9
(2) The user does specify a -triple (only one allowed):
(a) If no -arch options are specified, the triple specified by -triple
is used. E.g clang -triple i686-apple-darwin9
(b) If one or more -arch options are specified, then the triple specified
by -triple is used as the primary target, and the arch's specified
by -arch are used to create secondary targets. For example:
clang -triple i686-apple-darwin9 -arch ppc -arch ppc64
has the following targets:
i686-apple-darwin9 (primary target)
ppc-apple-darwin9
ppc64-apple-darwin9
Other changes related to the changes to the driver:
- TargetInfoImpl now includes the triple string.
- TargetInfo::getTargetTriple returns the triple for its primary target.
- test case test/Parser/portability.c has been updated because "-arch linux" is
no longer valid ("linux" is an OS, not an arch); instead we use a bogus
architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16.
llvm-svn: 44551
2007-12-03 22:06:55 +00:00
Chris Lattner
e5a91b4924
Fix an ast-print/ast-dump bug.
...
llvm-svn: 44550
2007-12-03 21:43:25 +00:00
Fariborz Jahanian
4f76f22975
Support for rewriteing of messaging of methods which return float.
...
llvm-svn: 44548
2007-12-03 21:26:48 +00:00
Fariborz Jahanian
9e7b848ac8
Added support for messagings which return a structure-value.
...
(Also fixed a regression caused by recent changes to synthesis of structs).
llvm-svn: 44540
2007-12-03 19:17:29 +00:00
Ted Kremenek
d85026d925
Added getTrueExpr() and getFalseExpr() to ConditionalOperator. These methods
...
provide handy accessors to the subexpressions of ConditionalOperator that
automatically take into account the GCC extension where the "LHS" expression is
omitted: e.g x ?: y;. When the LHS expression is available, getTrueExpr() is the
same as getLHS(); when LHS is NULL, getTrueExpr() returns the condition expression.
llvm-svn: 44536
2007-12-03 17:09:21 +00:00
Bill Wendling
db4e34984b
Fix for testcase that assigns a dereferenced reference to a pointer. The
...
standard says that we should adjust the "reference to T" type to "T"
before analysis.
llvm-svn: 44530
2007-12-03 07:33:35 +00:00
Seo Sanghyeon
3d072bea09
Ignore typedefs in pointer arithmetic codegen.
...
llvm-svn: 44529
2007-12-03 06:23:43 +00:00
Anders Carlsson
5dd106b212
Handle initializing vector elements correctly. Emit just one warning if there are excess initializers, instead of one per initializer.
...
llvm-svn: 44525
2007-12-03 01:01:28 +00:00
Chris Lattner
6e4f047422
add a fixme
...
llvm-svn: 44523
2007-12-02 23:05:46 +00:00
Anders Carlsson
ef93b9d011
Implement __builtin_bswap32 and __builtin_bswap64.
...
llvm-svn: 44521
2007-12-02 21:58:10 +00:00
Chris Lattner
4e4186b2de
fix logic for member expr codegen.
...
llvm-svn: 44520
2007-12-02 18:52:07 +00:00
Seo Sanghyeon
828429fea9
Fix isStructureType and isUnionType to ignore typedefs, as stated
...
in the header. Patch by Cédric Venet.
llvm-svn: 44519
2007-12-02 16:57:27 +00:00
Christopher Lamb
0cbd8723f3
Treat discarding array initializer elements as an extwarn (so -pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed.
...
llvm-svn: 44518
2007-12-02 08:49:54 +00:00
Chris Lattner
310369fb84
restore these lines, which fixes some regtest failures.
...
llvm-svn: 44516
2007-12-02 07:50:03 +00:00
Chris Lattner
6311b58000
all filevar's have static storage. Previously a global with
...
extern storage class was returning false from hasStaticStorage.
Ted, please review this.
llvm-svn: 44515
2007-12-02 07:47:49 +00:00
Christopher Lamb
39aeb4069b
Commit test for CL 44440.
...
llvm-svn: 44514
2007-12-02 07:47:19 +00:00
Chris Lattner
e4f0feb534
Fix buggy test
...
llvm-svn: 44513
2007-12-02 07:46:00 +00:00
Chris Lattner
0475c8178f
globals can't be vla's
...
llvm-svn: 44512
2007-12-02 07:32:25 +00:00