Mike Stump
65511704f7
Implement most of dynamic_cast. WIP.
...
llvm-svn: 88901
2009-11-16 06:50:58 +00:00
Eli Friedman
8c98dffd1f
Some minor cleanup for EmitCastLValue.
...
llvm-svn: 88894
2009-11-16 05:48:01 +00:00
Mike Stump
c9b231c8d1
Implement typeid for class types.
...
llvm-svn: 88843
2009-11-15 08:09:41 +00:00
Anders Carlsson
50cb321fdc
Handle CK_BitCast in EmitCastLValue.
...
llvm-svn: 88810
2009-11-14 21:21:42 +00:00
Anders Carlsson
52ce3bbf57
Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.
...
llvm-svn: 88735
2009-11-14 01:51:50 +00:00
Eli Friedman
a72bf0fae8
Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
...
doesn't crash. (Such expressions are valid in C++, but not in C.)
llvm-svn: 86513
2009-11-09 04:20:47 +00:00
Daniel Dunbar
7e215ea165
Add clarifying parens.
...
llvm-svn: 86457
2009-11-08 09:46:46 +00:00
Anders Carlsson
5bbdc9f857
Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.
...
llvm-svn: 86414
2009-11-07 23:16:50 +00:00
Anders Carlsson
ea4c30b39a
More LValue related code cleanup.
...
llvm-svn: 86413
2009-11-07 23:06:58 +00:00
Anders Carlsson
2ff6395ddc
More cleanup, the code is much easier to follow now.
...
llvm-svn: 86412
2009-11-07 22:53:10 +00:00
Anders Carlsson
6eee97276b
Reduce nesting, no functionality change.
...
llvm-svn: 86411
2009-11-07 22:46:42 +00:00
Anders Carlsson
03f83e58f7
We only need to call SetObjCNonGC for local variables. No functionality change.
...
llvm-svn: 86410
2009-11-07 22:43:34 +00:00
Anders Carlsson
509850ebec
Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.
...
llvm-svn: 86407
2009-11-07 22:00:15 +00:00
Chris Lattner
ab5e0af8bc
random tidying
...
llvm-svn: 85408
2009-10-28 17:39:19 +00:00
Chris Lattner
5e71d43155
adjust for a pending LLVM change.
...
llvm-svn: 85373
2009-10-28 05:12:07 +00:00
Fariborz Jahanian
038374f887
Add Code gen support for '->*' operator which fell
...
through the crack.
llvm-svn: 85160
2009-10-26 21:58:25 +00:00
Douglas Gregor
4bd90e53c2
Eliminate QualifiedDeclRefExpr, which captured the notion of a
...
qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g.,
namespace N { int i; }
int j = N::i;
Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.
Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.
llvm-svn: 84962
2009-10-23 18:54:35 +00:00
John McCall
6fd4c23324
Emit calls using the canonical prototype of the called function.
...
llvm-svn: 84947
2009-10-23 08:22:42 +00:00
Fariborz Jahanian
ffba662dd2
Complete code gen for '.*' binary expression for
...
both scalar and aggregates.
llvm-svn: 84910
2009-10-22 22:57:31 +00:00
Fariborz Jahanian
b25817ac1f
Expand on code gen. for pointer to data members so it works
...
for base classe members as well. Test case enhanced for this.
llvm-svn: 84780
2009-10-21 21:01:47 +00:00
Fariborz Jahanian
4ebdff5e1c
Code gen for pointer-to-datamember - WIP.
...
llvm-svn: 84771
2009-10-21 18:38:00 +00:00
Fariborz Jahanian
e4d94cee05
Code-gen for CXXZeroInitValueExpr AST passed
...
as argument to a function call. Removes a FIXME.
llvm-svn: 84694
2009-10-20 23:29:04 +00:00
Anders Carlsson
0999aafda5
Handle emitting the assignment operator when the lhs is a reference. Fixes PR5227.
...
llvm-svn: 84518
2009-10-19 18:28:22 +00:00
Daniel Dunbar
b5aacc282c
Twinify CodeGenFunction::CreateTempAlloca
...
llvm-svn: 84456
2009-10-19 01:21:05 +00:00
Anders Carlsson
69c2c4becc
When binding a reference to a temporary, it's important that other temporaries created as on the RHS are destroyed before emitting the dtor for the temporary.
...
llvm-svn: 84451
2009-10-18 23:09:21 +00:00
Anders Carlsson
66413c29d3
Handle
...
struct A { };
struct B : A { };
void f() {
const A& a = B();
}
correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope).
llvm-svn: 84162
2009-10-15 00:51:46 +00:00
Benjamin Kramer
abd5b90e4c
Simplify pointer creation with the new Type::getInt*Ptr methods.
...
llvm-svn: 83964
2009-10-13 10:07:13 +00:00
Devang Patel
dac79decf3
There is no need to attach debug location info with alloca instruction.
...
llvm-svn: 83913
2009-10-12 22:29:02 +00:00
Devang Patel
5d90d62701
Add support to attach debug info to an instruction.
...
This is not yet enabled.
llvm-svn: 83399
2009-10-06 18:36:08 +00:00
Fariborz Jahanian
e01e434aef
<rdar://problem/7263113> Make clang produce gcc's objc_assign_StrongCast as a result of type-cast of an ivar in assignment.
...
llvm-svn: 83150
2009-09-30 17:10:29 +00:00
Fariborz Jahanian
1f9ed58277
Fixed another code gen bug in objc's new write-barrier API.
...
llvm-svn: 82735
2009-09-25 00:00:20 +00:00
Fariborz Jahanian
7a95d72b10
Patch fixes a code gen. bug in generation of objc_assign_ivar
...
(objc GC's API).
llvm-svn: 82724
2009-09-24 22:25:38 +00:00
John McCall
8ccfcb51ee
Refactor the representation of qualifiers to bring ExtQualType out of the
...
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.
llvm-svn: 82705
2009-09-24 19:53:00 +00:00
John McCall
9dd450bb78
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
...
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
2009-09-21 23:43:11 +00:00
Fariborz Jahanian
71848a3ff1
Removed -fobjc-newgc-api option. clang now conforms to
...
gcc-style write-barrier api only.
llvm-svn: 82493
2009-09-21 23:03:37 +00:00
Fariborz Jahanian
38c3ae9bc4
Miscellanous fixes in generatation of objc gc's write-barriers.
...
llvm-svn: 82472
2009-09-21 18:54:29 +00:00
Fariborz Jahanian
2e32ddc7ba
Fixed a bug in generation of the new write-barriers when
...
array syntax is used to derefernce and assign to ivar pointee.
llvm-svn: 82183
2009-09-18 00:04:00 +00:00
Fariborz Jahanian
de1d324dce
patch for generating objc'2 objc_assign_ivar. WIP.
...
llvm-svn: 82090
2009-09-16 23:11:23 +00:00
Fariborz Jahanian
a7fa6beb2e
Starting patch to generate more specific API for objc's
...
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.
llvm-svn: 82082
2009-09-16 21:37:16 +00:00
Fariborz Jahanian
4141deb68e
Removed a superfluous check before setting
...
a flag (objc GC).
llvm-svn: 82052
2009-09-16 16:49:08 +00:00
Anders Carlsson
1450adbbf9
Code generation of Conditional operators that are lvalues (but that aren't bitfields).
...
llvm-svn: 81867
2009-09-15 16:35:24 +00:00
Anders Carlsson
96bad9a5cd
Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.
...
llvm-svn: 81738
2009-09-14 01:10:45 +00:00
Daniel Dunbar
0482cfd790
Don't use the PredefinedExpr string as the global variable name, these don't
...
make very nice symbols, just use the function name.
llvm-svn: 81653
2009-09-12 23:06:21 +00:00
Anders Carlsson
d95f9608ab
Handle CK_DerivedToBase when emitting lvalue casts.
...
llvm-svn: 81614
2009-09-12 16:16:49 +00:00
Anders Carlsson
f8e94f2008
Add support for __block variables with alignment greater than __alignof(void *).
...
llvm-svn: 81602
2009-09-12 02:44:18 +00:00
Douglas Gregor
15fc956ca0
Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID
...
llvm-svn: 81590
2009-09-12 00:22:50 +00:00
Daniel Dunbar
bbaeca4fef
Set the calling convention based on the CGFunctionInfo.
...
llvm-svn: 81582
2009-09-11 22:25:00 +00:00
Anders Carlsson
ecf9bf0158
GlobalDecl doesn't have an explicit constructor anymore.
...
llvm-svn: 81481
2009-09-10 23:43:36 +00:00
Anders Carlsson
e9766d559b
If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.
...
llvm-svn: 81383
2009-09-09 21:33:21 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00