Mike Stump
692c6e3729
Fix codegen for support for super inside block literal expressions.
...
llvm-svn: 67406
2009-03-20 21:53:12 +00:00
Fariborz Jahanian
391d4fc7f7
More super dot-syntax property implementation
...
when there is actually a property declaration
used in the dot-syntax.
llvm-svn: 67391
2009-03-20 19:18:21 +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
Mike Stump
5469f29aa9
Do up codegen for function static data and externs in functions in block
...
literals.
llvm-svn: 66984
2009-03-13 23:34:28 +00:00
Mike Stump
aeb0ffd56c
Codegen support for copy helpers for block literals.
...
llvm-svn: 66319
2009-03-07 02:35:30 +00:00
Mike Stump
d6ef62f0bf
Pass the type of the block literal around to make required temporal ordering of code clearer.
...
llvm-svn: 66284
2009-03-06 18:42:23 +00:00
Mike Stump
4446dcf061
prep work for copy/destroy helpers for block literals.
...
llvm-svn: 66159
2009-03-05 08:32:30 +00:00
Mike Stump
8473a12bfe
Move more blocks CodeGenFunction code up and out.
...
llvm-svn: 66049
2009-03-04 19:03:44 +00:00
Mike Stump
06acea8a69
Move some of the CodeGenFunction blocks code up and out. No
...
functionality change.
llvm-svn: 66048
2009-03-04 18:57:26 +00:00
Mike Stump
95435674f9
Move more of blocks codegen out of CodeGenModule and into the
...
BlockModule. No functionality change. This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.
llvm-svn: 66042
2009-03-04 18:17:45 +00:00
Mike Stump
edb252aeba
Start the migration of more of the blocks code out of sight for most
...
people. De-duplicates BLOCK_NEEDS_FREE and friends.
llvm-svn: 66034
2009-03-04 15:32:52 +00:00
Mike Stump
97d01d50d9
Improved ABI compliance for __block variables. No testcases yet as we
...
still give an unsupported error for them due to the fact this is a
work in progress.
llvm-svn: 66007
2009-03-04 03:23:46 +00:00
Anders Carlsson
ed5e69fe50
Do some blocks cleanup and simplification. Fix a crash, and add a test case.
...
llvm-svn: 65746
2009-03-01 01:09:12 +00:00
Chris Lattner
3385fe12ce
improve compatibility with the VC++'08 C++ compiler. Patch by
...
Niklas Larsson!
llvm-svn: 65706
2009-02-28 19:01:03 +00:00
Mike Stump
1db7d04b71
First cut CodeGen support for __block variables.
...
llvm-svn: 65688
2009-02-28 09:07:16 +00:00
Douglas Gregor
deaad8cc34
Create a new TypeNodes.def file that enumerates all of the types,
...
giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types.
Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.
As part of this, some types have been renamed:
TypeOfExpr -> TypeOfExprType
FunctionTypeProto -> FunctionProtoType
FunctionTypeNoProto -> FunctionNoProtoType
There shouldn't be any functionality change...
llvm-svn: 65591
2009-02-26 23:50:07 +00:00
Daniel Dunbar
76ba41ce4f
Add Type::hasPointerRepresentation predicate.
...
- For types whose native representation is a pointer.
- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.
llvm-svn: 65569
2009-02-26 20:52:22 +00:00
Mike Stump
b750d928ce
CodeGen support for copied BlockDeclRefExprs.
...
llvm-svn: 65487
2009-02-25 23:33:13 +00:00
Daniel Dunbar
a374e60e57
Fold GeneraticStaticBlockVarDecl into callers.
...
- No functionality change.
llvm-svn: 65470
2009-02-25 19:45:19 +00:00
Daniel Dunbar
22a87f94a9
Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating the
...
global variable) out of GenerateStaticBlockVarDecl.
- No intended functionality change.
- Prep for some mild cleanups and PR3662.
llvm-svn: 65466
2009-02-25 19:24:29 +00:00
Chris Lattner
d7e7b8e411
first wave of fixes for @encode sema support. This is part of PR3648.
...
The big difference here is that (like string literal) @encode has
array type, not pointer type.
llvm-svn: 65391
2009-02-24 22:18:39 +00:00
Anders Carlsson
729a8202d0
Prevent accidental copying of CodeGenFunction and CodeGenModule.
...
llvm-svn: 65372
2009-02-24 04:21:31 +00:00
Daniel Dunbar
1234749853
Add low level support for generating invoke instead of calls.
...
- No functionality change.
llvm-svn: 65325
2009-02-23 17:26:39 +00:00
Mike Stump
e8b2d066ea
Copy some clenaups from Eli to code that I copied. :-)
...
llvm-svn: 65286
2009-02-22 13:55:31 +00:00
Mike Stump
624497c29a
Cleanp code with some recent suggestions.
...
llvm-svn: 65285
2009-02-22 13:27:11 +00:00
Mike Stump
cb2fbcb0c9
Add CodeGen support for the helper for BlockDeclRefExprs. The easier
...
stuff is mostly done. Move BlockHasCopyDispose up.
llvm-svn: 65242
2009-02-21 20:00:35 +00:00
Daniel Dunbar
cdbb5e336d
Set call attribute for direct calls (i.e. noreturn).
...
- Remove an unused variant of EmitCallExpr overload.
llvm-svn: 65130
2009-02-20 18:06:48 +00:00
Mike Stump
2a9baebae1
Deox and Capitolize.
...
llvm-svn: 65093
2009-02-20 00:45:51 +00:00
Mike Stump
c6ea7c1812
Fixup spacing a little.
...
llvm-svn: 64768
2009-02-17 17:00:02 +00:00
Daniel Dunbar
8eb018ab9c
Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.
...
- Define pow[lf]?, sqrt[lf]? as builtins.
- Add -fmath-errno option which binds to LangOptions.MathErrno
- Add new builtin flag Builtin::Context::isConstWithoutErrno for
functions which can be marked as const if errno isn't respected for
math functions. Sema automatically marks these functions as const
when they are defined, if MathErrno=0.
- IRgen uses const attribute on sqrt and pow library functions to
decide if it can use the llvm intrinsic.
llvm-svn: 64689
2009-02-16 22:43:43 +00:00
Mike Stump
0e7d7b68c8
Use getNameAsCString instead of getNameAsString and reflow the type.
...
Thanks Anders.
llvm-svn: 64571
2009-02-14 22:49:33 +00:00
Mike Stump
2d5a2878d4
Generate the helper function for blocks. Now basic codegen is
...
starting to work for blocks.
llvm-svn: 64570
2009-02-14 22:16:35 +00:00
Mike Stump
85284bacab
Condense all the blocks code into CGBlocks.cpp.
...
llvm-svn: 64457
2009-02-13 16:19:19 +00:00
Anders Carlsson
63784f4e5e
Add CodeGen support for the nodebug attribute.
...
llvm-svn: 64445
2009-02-13 08:11:52 +00:00
Anders Carlsson
6a60fa2428
Add a very basic implemenation of global blocks. This needs to be cleaned up.
...
llvm-svn: 64387
2009-02-12 17:55:02 +00:00
Anders Carlsson
2437cbfa3b
Add support for generating block call expressions.
...
llvm-svn: 64346
2009-02-12 00:39:25 +00:00
Daniel Dunbar
8d9dc4a6d5
Support IRgen of va_arg of structure as l-value.
...
llvm-svn: 64325
2009-02-11 20:59:32 +00:00
Anders Carlsson
33c1b6528f
Remove the last remnants of the Obj-C EH stack code.
...
llvm-svn: 64205
2009-02-10 06:07:49 +00:00
Anders Carlsson
33747b6c41
Start removing the old Obj-C EH stack now that the cleanup stack is used instead.
...
llvm-svn: 64203
2009-02-10 05:52:02 +00:00
Daniel Dunbar
1d425460d5
Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversion
...
from LLVM memory type to/from LLVM temporary type.
- No intended functionality change.
llvm-svn: 64191
2009-02-10 00:57:50 +00:00
Anders Carlsson
f4478e94b8
Add DidCallStackSave variable to CodeGenFunction.
...
llvm-svn: 64156
2009-02-09 20:20:56 +00:00
Mike Stump
fc49682f20
Add some more documentation. Also reflowed comments to 80 col.
...
llvm-svn: 64105
2009-02-08 23:14:22 +00:00
Anders Carlsson
dcb149cbef
Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation of making it use the cleanup stack.
...
llvm-svn: 64098
2009-02-08 22:25:30 +00:00
Mike Stump
284d177c7f
Wire up break and continue processing to the new stack depth adjuster.
...
If people could beat on it and let me know if there are any new
semantics required by newer language standards or DRs or any little
details I goofed on, I'd be happy to fix any issues found.
llvm-svn: 64079
2009-02-08 09:22:19 +00:00
Anders Carlsson
66c384ac2e
More cleanup stack work, PopCleanupBlock now returns a struct with the switch block and end block.
...
llvm-svn: 64072
2009-02-08 07:46:24 +00:00
Anders Carlsson
ae91d9b140
Split some functions up
...
llvm-svn: 64069
2009-02-08 03:55:35 +00:00
Anders Carlsson
a586ad7f85
CleanupScope needs to push the cleanup block in its destructor
...
llvm-svn: 64068
2009-02-08 03:22:36 +00:00
Anders Carlsson
7d70fd27a4
More cleanup stack work.
...
llvm-svn: 64059
2009-02-08 00:50:42 +00:00
Anders Carlsson
fbfb5e6530
When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.
...
llvm-svn: 64053
2009-02-08 00:16:35 +00:00
Anders Carlsson
be0f76a712
Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary
...
llvm-svn: 64051
2009-02-07 23:50:39 +00:00