summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian2009-08-181-4/+5
| | | | | | | | 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
* Only do this for initializers of course.Anders Carlsson2009-08-161-8/+10
| | | | llvm-svn: 79197
* Destroy bound temporaries.Anders Carlsson2009-08-161-0/+16
| | | | llvm-svn: 79196
* Add an IsInitializer flag to EmitAnyExpr. This is used to prevent ↵Anders Carlsson2009-08-161-9/+16
| | | | | | temporaries from being destroyed when they're bound to a reference variable. llvm-svn: 79179
* use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if Chris Lattner2009-08-141-1/+1
| | | | | | VLASize isn't populated for the type yet. llvm-svn: 79057
* Update for LLVM API change.Owen Anderson2009-08-131-22/+33
| | | | llvm-svn: 78946
* Use the inbounds variant of getelementptr for common pointer arithmetic.Dan Gohman2009-08-121-3/+3
| | | | llvm-svn: 78756
* Update for LLVM API changes.Owen Anderson2009-07-301-8/+8
| | | | llvm-svn: 77638
* Canonicalize else spacing.Mike Stump2009-07-301-10/+5
| | | | llvm-svn: 77629
* Remove bogus "unsupported" case for vectors (which shouldn't Eli Friedman2009-07-301-2/+1
| | | | | | | | | | ever trigger). Add an "unsupported" case that triggers for C++ code. It would be nice if someone would implement this properly... it shouldn't be too hard, but I haven't looked closely at the relevant code. llvm-svn: 77562
* Update for LLVM API change.Owen Anderson2009-07-291-8/+8
| | | | llvm-svn: 77514
* Change uses of:Ted Kremenek2009-07-291-3/+3
| | | | | | | | | | | | | | | | | | | | Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. llvm-svn: 77510
* Patch to provide cast of objects in member accessFariborz Jahanian2009-07-291-16/+0
| | | | | | | excpression, if needed, and remove some ir-gen code now unnencessary. llvm-svn: 77490
* Code refactoring to define getCXXRecordDeclForPointerTypeFariborz Jahanian2009-07-291-10/+9
| | | | | | and use it in several places. llvm-svn: 77411
* Update for LLVM API change.Owen Anderson2009-07-281-6/+6
| | | | llvm-svn: 77368
* More cleanup of data member access and then some.Fariborz Jahanian2009-07-281-8/+16
| | | | llvm-svn: 77351
* More work toward data member access ir-gen.Fariborz Jahanian2009-07-281-0/+10
| | | | llvm-svn: 77332
* Update for LLVM API change.Owen Anderson2009-07-241-29/+29
| | | | llvm-svn: 77012
* Move the LLVM field number for bit fields into the BitFieldInfo structure, ↵Anders Carlsson2009-07-231-7/+7
| | | | | | since it's meaning is completely different than for non-bit fields. llvm-svn: 76882
* Preserve address space information through member accesses, e.g., Mon P Wang2009-07-221-22/+47
| | | | | | | __attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1; ... = p1->arr[2]; // load from address space 1 llvm-svn: 76717
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-3/+3
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek2009-07-161-3/+3
| | | | | | | | | | | | | | | | | | | | | This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
* Remove ASTContext::isObjCObjectPointerType().Steve Naroff2009-07-161-1/+1
| | | | | | Convert all clients to use the new predicate on Type. llvm-svn: 76076
* Update for LLVM API change.Owen Anderson2009-07-161-1/+1
| | | | llvm-svn: 75869
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-50/+52
| | | | llvm-svn: 75705
* This patch includes a conceptually simple, but very intrusive/pervasive change. Steve Naroff2009-07-101-8/+9
| | | | | | | | | | | | The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches. This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic. By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time. Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks. llvm-svn: 75314
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* OpenCL 1.0 Support: fix a bug with lvalue swizzlesNate Begeman2009-06-261-3/+4
| | | | llvm-svn: 74324
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-2/+3
| | | | llvm-svn: 73702
* Fix PR4372, another case where non-prototyped functions can prevent Chris Lattner2009-06-131-2/+1
| | | | | | always_inline from working. llvm-svn: 73273
* PR4339: make sure to properly extend/trunc the index of a vector element Eli Friedman2009-06-061-4/+4
| | | | | | | insert/extract; the relevant instructions are defined to take only an i32. llvm-svn: 73005
* A corner case of objc2 gc's write-barrier generationFariborz Jahanian2009-06-011-2/+2
| | | | | | for the Next runtime. llvm-svn: 72703
* PR4289: Make sure "&func" has the right LLVM type when "func" is a Eli Friedman2009-06-011-2/+14
| | | | | | K&R-style definition. llvm-svn: 72690
* Emit destructors correctly for temporaries.Anders Carlsson2009-05-311-1/+1
| | | | llvm-svn: 72655
* Add lvalue irgen support for CXXBindTemporaryExpr.Anders Carlsson2009-05-301-2/+13
| | | | llvm-svn: 72649
* More temporary support.Anders Carlsson2009-05-301-1/+10
| | | | llvm-svn: 72648
* Some small fixes for fields of reference type.Eli Friedman2009-05-301-0/+2
| | | | llvm-svn: 72636
* Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump2009-05-291-2/+3
| | | | | | | any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. llvm-svn: 72572
* Change a confusing variable name.Fariborz Jahanian2009-05-271-3/+3
| | | | llvm-svn: 72491
* Handle operator call expressions where the callee is a member function.Anders Carlsson2009-05-271-0/+5
| | | | llvm-svn: 72458
* Add support for emitting calls to functions that return references (as ↵Anders Carlsson2009-05-271-1/+10
| | | | | | lvalues only for now) llvm-svn: 72449
* Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't ↵Anders Carlsson2009-05-271-6/+6
| | | | | | emit an expr. llvm-svn: 72446
* Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).Mike Stump2009-05-261-2/+2
| | | | llvm-svn: 72439
* More volatile fixes. Can't testcase these yet as ultimately volatileMike Stump2009-05-231-1/+1
| | | | | | is still ignored. llvm-svn: 72344
* Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.Daniel Dunbar2009-05-231-1/+3
| | | | | | - Otherwise we may incorrectly miss generation of some write barriers. llvm-svn: 72313
* Handle the remaining unhandled cases in EmitReferenceBindingToExpr.Eli Friedman2009-05-201-15/+18
| | | | | | | | It would be nice if someone could write an ObjC++ testcase for the case of passing a property returning a struct to a function taking a const reference. llvm-svn: 72159
* irgen for references to complex rvales (Very important...)Anders Carlsson2009-05-201-1/+7
| | | | llvm-svn: 72157
* Create a temporary if the lvalue is a bitfield. Reported by Eli.Anders Carlsson2009-05-201-1/+1
| | | | llvm-svn: 72155
* Add support for binding references to scalar rvalues.Anders Carlsson2009-05-201-0/+8
| | | | llvm-svn: 72153
* Bind references to lvalues correctly.Anders Carlsson2009-05-201-0/+6
| | | | llvm-svn: 72150
OpenPOWER on IntegriCloud