Anders Carlsson
458055a890
Revert r80064 since it broke the build.
...
llvm-svn: 80066
2009-08-26 03:30:14 +00:00
Mike Stump
fbddfdacdc
Implement virtual dispatch. :-) This is self-consistent with clang, but not yet
...
necessarily perfectly consistent with gcc.
llvm-svn: 80064
2009-08-26 01:54:35 +00:00
Anders Carlsson
4557b2c0c2
Remove dead code
...
llvm-svn: 79921
2009-08-24 16:52:33 +00:00
Fariborz Jahanian
8adc973483
Patch to ir-gen copy assigning array members when synthesizing
...
a copy assignment operator function.
llvm-svn: 79681
2009-08-21 22:34:55 +00:00
Fariborz Jahanian
5626384384
Patch to provide ir-gen support in copying array members
...
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.
llvm-svn: 79653
2009-08-21 18:30:26 +00:00
Fariborz Jahanian
9c83720d17
ir-gen patch to destruct array members. WIP.
...
llvm-svn: 79565
2009-08-20 20:54:15 +00:00
Fariborz Jahanian
9a84665921
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
...
A field rename and more comments.
llvm-svn: 79537
2009-08-20 17:02:02 +00:00
Fariborz Jahanian
431c883287
ir-gen for constructing arrays as non-static data members. WIP.
...
llvm-svn: 79464
2009-08-19 20:55:16 +00:00
Mike Stump
494c42526b
Add some documentation.
...
llvm-svn: 79373
2009-08-18 21:59:28 +00:00
Mike Stump
07347353a0
Cleanups. Move GenerateRtti to CodeGenModule.
...
llvm-svn: 79372
2009-08-18 21:49:00 +00:00
Mike Stump
ee81dca8c7
Move the rest of the vtable building code into the new builder.
...
llvm-svn: 79370
2009-08-18 21:30:21 +00:00
Fariborz Jahanian
88cc2340de
Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
...
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).
llvm-svn: 79365
2009-08-18 20:50:23 +00:00
Fariborz Jahanian
d172e91f2a
Patch to 1) synthesizing non-trivial default destructor when
...
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.
llvm-svn: 79269
2009-08-17 19:04:50 +00:00
Anders Carlsson
81f0df9601
Improve handling of delete expressions.
...
llvm-svn: 79205
2009-08-16 21:13:42 +00:00
Anders Carlsson
5b106a7545
Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.
...
llvm-svn: 79179
2009-08-16 07:36:22 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Eli Friedman
04fddf0d1f
Fix for PR4721: adjust CodeGen and ASTContext so that we have a
...
consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071
2009-08-15 02:50:32 +00:00
Mike Stump
c2f591b1e6
Refine vtable layout for virtual bases and keep better track of
...
primaries. WIP.
llvm-svn: 78950
2009-08-13 22:53:07 +00:00
Owen Anderson
41a750271b
Update for LLVM API change.
...
llvm-svn: 78946
2009-08-13 21:57:51 +00:00
Fariborz Jahanian
bbd5e8c2cf
More toward synthesizing copy assignments. SWIP.
...
llvm-svn: 78861
2009-08-12 23:34:46 +00:00
Mike Stump
938f15b033
Refactor. WIP. Eventually, this will all go into a vtable builder class.
...
llvm-svn: 78857
2009-08-12 23:14:12 +00:00
Mike Stump
82165efbc4
Refactor.
...
llvm-svn: 78854
2009-08-12 23:00:59 +00:00
Fariborz Jahanian
de7d4c264a
Patch for synthesizing copy assignment operator.
...
WIP.
llvm-svn: 78841
2009-08-12 21:14:35 +00:00
Mike Stump
cecfe61cd1
Refine vtable building for the secondary vtables to exclude yet more
...
cases where a virtual base was already used as a primary base class.
WIP.
llvm-svn: 78820
2009-08-12 17:42:21 +00:00
Benjamin Kramer
9cd050ab07
LLVMContext is a class now.
...
llvm-svn: 78691
2009-08-11 17:46:57 +00:00
Fariborz Jahanian
9d3405ceab
minor refactoring. No change otherwise.
...
llvm-svn: 78582
2009-08-10 18:46:38 +00:00
Fariborz Jahanian
24f38969d5
ir-gen for initialization, in synthesize copy constructor,
...
of base/field which have trivial copy constructor.
llvm-svn: 78516
2009-08-08 23:32:22 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00
Anders Carlsson
f40886acca
Refactor some code and implement support for global destructors for static variables.
...
llvm-svn: 78507
2009-08-08 21:45:14 +00:00
Fariborz Jahanian
f6bda5d61e
Refactoring of copy ctor ir-gen. No change in functionality.
...
llvm-svn: 78489
2009-08-08 19:31:03 +00:00
Fariborz Jahanian
b68df0bc42
Synthesized copy constructor now generates code for
...
copying non-virtual base classes which have non-trivial
constructor. Work in progress.
llvm-svn: 78436
2009-08-07 23:51:33 +00:00
Fariborz Jahanian
40134e71be
More synthesis of copy constructors. Work in progress.
...
llvm-svn: 78402
2009-08-07 20:22:40 +00:00
Mike Stump
7c32eab164
Add support for vcall generation for vtables for virtual bases. WIP.
...
llvm-svn: 78357
2009-08-06 23:48:32 +00:00
Mike Stump
3e62d00271
Also generate the rtti field for virtual bases for vtables. Turn on
...
rtti so we can properly test it. Refactor code a little. Still a
work in progress.
llvm-svn: 78343
2009-08-06 21:49:36 +00:00
Mike Stump
c255f3581a
More layout for virtual tables for virtual bases. Still in progress.
...
llvm-svn: 78314
2009-08-06 15:50:11 +00:00
Owen Anderson
758428f4e3
Update for LLVM API change.
...
llvm-svn: 78259
2009-08-05 23:18:46 +00:00
Mike Stump
183c3d2f59
Add beginnigs of rtti generation, wire up more of -fno-exceptions.
...
llvm-svn: 77751
2009-07-31 23:15:31 +00:00
Mike Stump
bc78a728ee
Add code to setup the vtable pointer in the constructor. Work in progress.
...
llvm-svn: 77699
2009-07-31 18:25:34 +00:00
Fariborz Jahanian
aa01d2a532
Patch for future ir-gen for destructor calls.
...
llvm-svn: 77608
2009-07-30 17:49:11 +00:00
Fariborz Jahanian
b77659f4ae
Some code cleanup.
...
llvm-svn: 77339
2009-07-28 18:09:28 +00:00
Fariborz Jahanian
5142fbd02e
More work toward data member access ir-gen.
...
llvm-svn: 77332
2009-07-28 17:38:28 +00:00
Fariborz Jahanian
127059c7ec
Early ir-gen for constructor prologue. This is on going.
...
llvm-svn: 76493
2009-07-20 22:35:22 +00:00
Daniel Dunbar
b6adc43f6e
Avoid generation of dead code in a few more situations.
...
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.
- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).
- Anders, I added two fixmes on calls to EmitVLASize, can you check them?
llvm-svn: 76361
2009-07-19 06:58:07 +00:00
Owen Anderson
170229f68d
Update for LLVM API change, and contextify a bunch of related stuff.
...
llvm-svn: 75705
2009-07-14 23:10:40 +00:00
Owen Anderson
ae86c19e68
Update for LLVM API change.
...
llvm-svn: 75446
2009-07-13 04:10:07 +00:00
Fariborz Jahanian
5f21d2f69a
Implemented memmove_collectable API for Next runtime
...
when struct variables with GC'able members are copied into.
Will provide a test case later.
llvm-svn: 74984
2009-07-08 01:18:33 +00:00
Anders Carlsson
44bfcf0f97
Add PushConditionalTempDestruction/PopConditionalTempDestruction.
...
llvm-svn: 72835
2009-06-04 02:22:12 +00:00
Anders Carlsson
4c49bb95f8
More temporary work.
...
llvm-svn: 72796
2009-06-03 19:05:16 +00:00
Anders Carlsson
6d36343ed8
Store more information about live temporaries. No functionality change for now.
...
llvm-svn: 72793
2009-06-03 18:54:26 +00:00
Anders Carlsson
4a7b49b56a
Add a new function for emitting new functions.
...
llvm-svn: 72656
2009-05-31 01:40:14 +00:00
Anders Carlsson
8eb93e72f7
Emit destructors correctly for temporaries.
...
llvm-svn: 72655
2009-05-31 00:34:10 +00:00
Anders Carlsson
fd2af0cf86
Add lvalue irgen support for CXXBindTemporaryExpr.
...
llvm-svn: 72649
2009-05-30 23:30:54 +00:00
Anders Carlsson
3be22e27b6
More temporary support.
...
llvm-svn: 72648
2009-05-30 23:23:33 +00:00
Anders Carlsson
0a63741a3f
Add code for emitting C++ destructors. Not used yet.
...
llvm-svn: 72591
2009-05-29 21:03:38 +00:00
Mike Stump
df0fe27b66
Fixup the rest of the trivial cases of the codegen of volatile. If
...
any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.
llvm-svn: 72572
2009-05-29 15:46:01 +00:00
Anders Carlsson
4034a95dc8
Handle operator call expressions where the callee is a member function.
...
llvm-svn: 72458
2009-05-27 04:18:27 +00:00
Anders Carlsson
3a9463bfda
Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't emit an expr.
...
llvm-svn: 72446
2009-05-27 01:22:39 +00:00
Mike Stump
ec3cbfe8c6
Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).
...
llvm-svn: 72439
2009-05-26 22:03:21 +00:00
Mike Stump
5e9e61b8d2
Track volatile aggregate copies better. I'm hoping someone else will decide
...
how to get the backend to know that the operation is volatile.
llvm-svn: 72348
2009-05-23 22:29:41 +00:00
Anders Carlsson
6f5a015bd9
Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)
...
llvm-svn: 72147
2009-05-20 00:24:07 +00:00
Anders Carlsson
8370964257
Pass the destination QualType to EmitStoreOfScalar. No functionality change.
...
llvm-svn: 72118
2009-05-19 18:50:41 +00:00
Anders Carlsson
bd7d11f770
Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.
...
llvm-svn: 71514
2009-05-11 23:37:08 +00:00
Daniel Dunbar
d53e07b396
Remove unnecessary copy of constraint info.
...
llvm-svn: 70835
2009-05-04 06:56:16 +00:00
Anders Carlsson
1619a5041c
Make codegen for constructors work again.
...
llvm-svn: 70785
2009-05-03 17:47:16 +00:00
Chris Lattner
f0b64d73a8
split ObjC and C++ Statements out into their own headers.
...
llvm-svn: 70105
2009-04-26 01:32:48 +00:00
Chris Lattner
a4185c543e
fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue
...
llvm-svn: 70067
2009-04-25 19:35:26 +00:00
Chris Lattner
28ec0cf86c
the logic for computing __func__ and friends is really broken:
...
the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.
llvm-svn: 69872
2009-04-23 05:30:27 +00:00
Daniel Dunbar
722f424178
Make ObjCInterfaceDecl's const in some more places.
...
llvm-svn: 69775
2009-04-22 05:08:15 +00:00
Daniel Dunbar
9ebf9516af
Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
...
when we need them -- which is exactly what some code was already
doing!
- No intended functionality change.
llvm-svn: 69648
2009-04-21 01:19:28 +00:00
Eli Friedman
fe92e701aa
Silence gcc warning.
...
llvm-svn: 69541
2009-04-19 20:21:56 +00:00
Anders Carlsson
603d6aff8b
Make CodeGenFunction::EmitCallArgs a template function that takes a generic "Type Info" parameter. The type info parameter knows how to iterate over its arguments.
...
llvm-svn: 69469
2009-04-18 20:20:22 +00:00
Anders Carlsson
b7f8f594f3
Implement basic code generation of constructor calls. We can now compile:
...
struct S {
S(int, int);
};
void f() {
S s(10, 10);
}
llvm-svn: 69330
2009-04-17 00:06:03 +00:00
Anders Carlsson
a5d077df73
Support code generation of 'this' exprs
...
llvm-svn: 69050
2009-04-14 16:58:56 +00:00
Anders Carlsson
7f96b360f2
Remove asserts that weren't really useful, and that would fire in case the CleanupEntries vector needed to be reallocated.
...
llvm-svn: 68835
2009-04-10 22:49:13 +00:00
Anders Carlsson
60ce3fe140
Add code for emitting call arguments (not used yet).
...
llvm-svn: 68639
2009-04-08 20:47:54 +00:00
Anders Carlsson
468fa6366b
Add some basic support for generating C++ member functions.
...
llvm-svn: 68425
2009-04-04 20:47:02 +00:00
Anders Carlsson
e5fd6f2227
Add support for calling C++ member functions.
...
llvm-svn: 68412
2009-04-03 22:50:24 +00:00
Daniel Dunbar
f77e292a0f
Fix a subtle bug where the cleanup scope entries had a dangling block reference
...
- <rdar://problem/6732143> Crash when generating @synchronize for
zero-cost exception
- Thanks to Anders for helping track down the problem.
llvm-svn: 68186
2009-04-01 04:37:47 +00:00
Chris Lattner
2739d2bbe6
remove some obsolete comments, use an AssertingVH.
...
llvm-svn: 68151
2009-03-31 22:17:44 +00:00
Mike Stump
d2142cffbf
Fixup codegen for block literals that bleed copy/dispose information
...
from previous block literals.
llvm-svn: 67696
2009-03-25 17:58:24 +00:00
Daniel Dunbar
bf1fe8c36c
Support member reference on ?: of struct type.
...
llvm-svn: 67603
2009-03-24 02:38:23 +00:00
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
Anders Carlsson
2cf8c44e43
Add a simple RAII object, to be used for pushing a cleanup entry and make the insertion point be the cleanup block.
...
llvm-svn: 64048
2009-02-07 23:30:41 +00:00
Mike Stump
0509d9635b
Ensure we track all the stack depths for all break and continue points
...
correctly. This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.
llvm-svn: 64046
2009-02-07 23:02:10 +00:00
Anders Carlsson
15cb75a20c
Add plumbing for the cleanup stack.
...
llvm-svn: 64043
2009-02-07 22:53:43 +00:00
Anders Carlsson
bf8a1be33c
Split the exception object out into its own stack.
...
llvm-svn: 64032
2009-02-07 21:37:21 +00:00
Anders Carlsson
da0e4560a1
Simplify the Objective-C exception handling.
...
llvm-svn: 64031
2009-02-07 21:26:04 +00:00
Mike Stump
dc0d6be7b9
Arrange to have the correct StackDepth for while statements.
...
llvm-svn: 64021
2009-02-07 18:08:12 +00:00
Mike Stump
1d91dd98ad
Fixup goto codegen in and around VLAs.
...
llvm-svn: 64014
2009-02-07 12:52:26 +00:00
Daniel Dunbar
c79407fc40
Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.
...
llvm-svn: 63845
2009-02-05 07:09:07 +00:00
Daniel Dunbar
ee3da87ce7
Add CodeGenFunction::ConvertTypeForMem forwarding function.
...
llvm-svn: 63678
2009-02-03 23:03:55 +00:00
Fariborz Jahanian
712bfa6478
ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).
...
llvm-svn: 63644
2009-02-03 19:03:09 +00:00
Sanjiv Gupta
c1b58d40e6
Targets that don't have stack use global address space for parameters.
...
Specify external linkage for such globals so that llvm optimizer do
not assume there values initialized as zero.
llvm-svn: 63636
2009-02-03 18:07:49 +00:00
Sanjiv Gupta
3cac613eb8
Fixed the typo in comment.
...
llvm-svn: 63634
2009-02-03 17:23:12 +00:00
Fariborz Jahanian
c88a70d885
objc2's ir-gen for nonfragile ivar access.
...
llvm-svn: 63578
2009-02-03 00:09:52 +00:00
Daniel Dunbar
d931a87f90
More ABI API cleanup.
...
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.
llvm-svn: 63553
2009-02-02 22:03:45 +00:00
Daniel Dunbar
7633cbf005
ABI handling API changes.
...
- Lift CGFunctionInfo creation up to callers of EmitCall.
- Move isVariadic bit out of CGFunctionInfo, take as argument to
GetFunctionType instead.
No functionality change.
llvm-svn: 63550
2009-02-02 21:43:58 +00:00
Daniel Dunbar
fd346a3644
Pull EmitReturnBlock out of FinishFunction and catch unified return
...
case correctly.
llvm-svn: 63068
2009-01-26 23:27:52 +00:00
Eli Friedman
ddea0ade30
Slight cleanup, and fix for va_arg on architectures where va_list is a
...
struct.
llvm-svn: 62585
2009-01-20 17:46:04 +00:00
Anders Carlsson
03aaf11502
Forgot to commit this
...
llvm-svn: 62042
2009-01-11 19:40:10 +00:00
Fariborz Jahanian
0196a1cd2b
This patch fixes the code gen failures which was a fallout from
...
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.
llvm-svn: 62030
2009-01-10 21:06:09 +00:00