Anders Carlsson
a726c1763a
Append an extra newline to the module inline asm if it's not empty.
...
llvm-svn: 60827
2008-12-10 02:21:04 +00:00
Fariborz Jahanian
3d8552a75d
Support for implementation of property in the case where
...
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.
llvm-svn: 60792
2008-12-09 20:23:04 +00:00
Chris Lattner
2e41b0e6e7
Fix a serious null termination bug found by David Chisnall!
...
llvm-svn: 60778
2008-12-09 19:10:54 +00:00
Fariborz Jahanian
8e0079c787
Change condition under which 'retain'/'copy' are directly evaluated.
...
llvm-svn: 60729
2008-12-08 23:56:17 +00:00
Douglas Gregor
4619e439b6
Introduce basic support for dependent types, type-dependent
...
expressions, and value-dependent expressions. This permits us to parse
some template definitions.
This is not a complete solution; we're missing type- and
value-dependent computations for most of the expression types, and
we're missing checks for dependent types and type-dependent
expressions throughout Sema.
llvm-svn: 60615
2008-12-05 23:32:09 +00:00
Douglas Gregor
5101c24f60
Representation of template type parameters and non-type template
...
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)
Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.
Next up: dependent types and value-dependent/type-dependent
expressions.
llvm-svn: 60597
2008-12-05 18:15:24 +00:00
Daniel Dunbar
2c4efe68ea
Mention an optimization opportunity pointed out by Chris.
...
llvm-svn: 60535
2008-12-04 09:05:45 +00:00
Sebastian Redl
45c2f9d320
Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though.
...
llvm-svn: 60515
2008-12-04 00:10:55 +00:00
Anders Carlsson
6a113d9ddb
If a global var decl has an initializer, make sure to always set its linkage to external.
...
llvm-svn: 60462
2008-12-03 05:51:23 +00:00
Eli Friedman
e918435f94
Fix for PR3150: obvious copy-paste bug in
...
ScalarExprEmitter::VisitBinLOr.
llvm-svn: 60415
2008-12-02 16:02:46 +00:00
Eli Friedman
f5d08c9ee4
Disabling this code due to regression on test/CodeGen/bitfield.c. See
...
PR3152.
llvm-svn: 60389
2008-12-02 01:17:45 +00:00
Anders Carlsson
8628645e94
Change more code over to using the new Expr::Evaluate
...
llvm-svn: 60324
2008-12-01 02:46:24 +00:00
Anders Carlsson
38eef1de6c
Change more code over to using the new Expr::Evaluate
...
llvm-svn: 60323
2008-12-01 02:42:14 +00:00
Anders Carlsson
c9687907c5
Use the new Expr::Evaluate
...
llvm-svn: 60321
2008-12-01 02:31:41 +00:00
Eli Friedman
c59bb48e80
Fix for PR2969: generate a memcpy from a constant for constant
...
initializers. llvm-gcc appears to be more aggressive, but incorrect,
for constructs like "const int a[] = {1,2,3};"; that said, current
optimizers will do the appropriate optimizations when safe.
llvm-svn: 60270
2008-11-30 02:11:09 +00:00
Daniel Dunbar
e9095f55c7
Test commit.
...
llvm-svn: 60147
2008-11-27 03:47:29 +00:00
Fariborz Jahanian
57251782d0
Code gen for aggregate-valued properties and a test case.
...
llvm-svn: 60122
2008-11-26 22:36:09 +00:00
Anders Carlsson
f7a9a92359
Convert incomplete array types before emitting debug info for them, fixes PR3134.
...
llvm-svn: 60109
2008-11-26 17:40:42 +00:00
Anders Carlsson
32ef8ceaa1
Handle returning complex types that get coerced. Fixes PR3131
...
llvm-svn: 60058
2008-11-25 22:21:48 +00:00
Daniel Dunbar
44b58a2c14
Fix 80-col violations.
...
llvm-svn: 60051
2008-11-25 21:53:21 +00:00
Anders Carlsson
9f77f60620
Remove the #ifdeffed out code.
...
llvm-svn: 60032
2008-11-25 17:10:10 +00:00
Chris Lattner
f3d3faeca6
Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
...
uses of getName() with uses of getDeclName(). This upgrades a bunch of
diags to take DeclNames instead of std::strings.
This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.
llvm-svn: 59947
2008-11-24 05:29:24 +00:00
Chris Lattner
1cbaacc4a0
Migrate some stuff from NamedDecl::getName() to
...
NamedDecl::getNameAsString() to make it more explicit.
llvm-svn: 59937
2008-11-24 04:00:27 +00:00
Chris Lattner
86d7d91366
Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
...
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.
llvm-svn: 59936
2008-11-24 03:54:41 +00:00
Chris Lattner
e4b95698df
Rename Selector::getName() to Selector::getAsString(), and add
...
a new NamedDecl::getAsString() method.
Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.
This also adds new formatters for objcinstance and objcclass
as described in the dox.
llvm-svn: 59933
2008-11-24 03:33:13 +00:00
Anders Carlsson
4046e65b27
An expression is not foldable if it can't be fully evaluated. Fixes PR3060
...
llvm-svn: 59887
2008-11-22 22:32:07 +00:00
Fariborz Jahanian
9ac535162b
Implemented ir-gen for 'implicit' properties using the new AST nodes.
...
llvm-svn: 59886
2008-11-22 22:30:21 +00:00
Anders Carlsson
59689ed764
Use Expr::Evaluate for case statements. Fixes PR2525
...
llvm-svn: 59881
2008-11-22 21:04:56 +00:00
Fariborz Jahanian
8a1810f06b
New AST node to access "implicit" setter/getter using property dor syntax.
...
Issuing diagnostics when assigning to read-only properties.
This is work in progress.
llvm-svn: 59874
2008-11-22 18:39:36 +00:00
Anders Carlsson
20e11f8fc8
Use tryEvaluate for constant exprs.
...
llvm-svn: 59857
2008-11-22 02:34:39 +00:00
Fariborz Jahanian
e2caaaa13c
Fixed bugzilla bug# 3095 related to code gen. for @synchronized.
...
llvm-svn: 59838
2008-11-21 19:21:53 +00:00
Fariborz Jahanian
735a4158d9
Fields of ivars of struct types are considered ivars
...
themselves for gc API generation purposes.
llvm-svn: 59828
2008-11-21 18:14:01 +00:00
Chris Lattner
0f137df0aa
reapply the (corrected) patch to use the new llvm intrinsics for memcpy/memmove etc.
...
llvm-svn: 59824
2008-11-21 16:43:15 +00:00
Chris Lattner
b7f4ce3de7
temporarily revert Sangiv's patch.
...
llvm-svn: 59821
2008-11-21 16:26:37 +00:00
Sanjiv Gupta
371298488b
mem[cpy,set,move] intrinsics are now overloaded.
...
llvm-svn: 59806
2008-11-21 07:57:42 +00:00
Fariborz Jahanian
c2ad6dc3b4
Consolidated @try and @synchronize into a single
...
code gen. method.
llvm-svn: 59767
2008-11-21 00:49:24 +00:00
Fariborz Jahanian
75686a58f3
Support generation of objc_assign_ivar for ivar
...
write-barriers.
llvm-svn: 59748
2008-11-20 20:53:20 +00:00
Fariborz Jahanian
e881b536e8
Introducing objc_assign_ivar to clang.
...
llvm-svn: 59740
2008-11-20 19:23:36 +00:00
Fariborz Jahanian
d4081c697a
Added a test case for __weak field decls. Change SetVarDeclObjCAttribute
...
to static function. Added comments.
llvm-svn: 59738
2008-11-20 18:10:58 +00:00
Chris Lattner
68e486804f
Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
...
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.
llvm-svn: 59706
2008-11-20 04:42:34 +00:00
Fariborz Jahanian
003e83004b
More objc gc stuff. Read/Write barriers for local static/extern,
...
diagnostics on use of __weak attribute on fields,
Early support for read/write barriers for objc fields.
llvm-svn: 59682
2008-11-20 00:15:42 +00:00
Fariborz Jahanian
a598b5286e
More of objective-c's gc code-gen. Treat objective-c
...
objects as __strong when attribute unspecified.
llvm-svn: 59654
2008-11-19 18:38:10 +00:00
Fariborz Jahanian
50a1270d87
Few more changes due to Daniel's feedback.
...
llvm-svn: 59645
2008-11-19 17:34:06 +00:00
Daniel Dunbar
7689f6be47
Add spec ref to comment.
...
llvm-svn: 59622
2008-11-19 11:54:05 +00:00
Daniel Dunbar
9b1335eca8
Fix redundant load of bit-fields on assignment (to get the updated
...
value).
- Use extra argument to EmitStoreThroughLValue to provide place to
write update bit-field value if caller requires it.
- This fixes several FIXMEs.
llvm-svn: 59615
2008-11-19 09:36:46 +00:00
Sanjiv Gupta
f99d54498a
Pointer width for PIC16 is 16 bits. Modify getMemCpy, getMemMove and getMemSet accordingly.
...
llvm-svn: 59613
2008-11-19 09:02:07 +00:00
Chris Lattner
e503373e67
fix save-o
...
llvm-svn: 59611
2008-11-19 08:26:36 +00:00
Chris Lattner
d9c7bcf4bc
simplify
...
llvm-svn: 59610
2008-11-19 08:24:49 +00:00
Daniel Dunbar
1b9ad472a4
Discard unused runtime function declarations (for readability).
...
llvm-svn: 59594
2008-11-19 06:15:35 +00:00
Fariborz Jahanian
d7db964495
Generate strong write barriers for __strong objects.
...
Also, took care of Daniel's commments.
llvm-svn: 59575
2008-11-19 00:59:10 +00:00