summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't ↵Anders Carlsson2009-05-201-0/+7
| | | | | | support anything but at least we don't crash ;) llvm-svn: 72147
* Improve support for irgen of references.Anders Carlsson2009-05-191-4/+10
| | | | llvm-svn: 72133
* Only do the bitcast in EmitStoreOfScalar if the type is a boolean.Anders Carlsson2009-05-191-15/+12
| | | | llvm-svn: 72125
* Pass the destination QualType to EmitStoreOfScalar. No functionality change.Anders Carlsson2009-05-191-3/+3
| | | | llvm-svn: 72118
* Reflow some comments.Mike Stump2009-05-161-11/+10
| | | | llvm-svn: 71937
* implement l-value codegen of comma exprChris Lattner2009-05-121-0/+6
| | | | llvm-svn: 71595
* push GlobalDecl through enough of the CodeGenModule interfacesChris Lattner2009-05-121-1/+1
| | | | | | | | | to allow us to support generation of deferred ctors/dtors. It looks like codegen isn't emitting a call to the dtor in member-functions.cpp:test2, but when it does, its body should get emitted. llvm-svn: 71594
* Provide basic support for generation of objc2's Fariborz Jahanian2009-05-041-1/+6
| | | | | | | objc_assign_global API when assigning to global objective-c object pointer. llvm-svn: 70939
* Make codegen for constructors work again.Anders Carlsson2009-05-031-2/+0
| | | | llvm-svn: 70785
* fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue Chris Lattner2009-04-251-2/+15
| | | | llvm-svn: 70067
* Fix pointer addressing and array subscripting of Objective-C interfaceDaniel Dunbar2009-04-251-3/+19
| | | | | | | | | | | types. - I broke this in the switch to representing interfaces with opaque types. - <rdar://problem/6822660> clang crashes on subscript of interface in 32-bit mode llvm-svn: 70009
* Clang part of r69947. Reverting back 69574 as it is no longer needed.Sanjiv Gupta2009-04-241-5/+2
| | | | llvm-svn: 69949
OpenPOWER on IntegriCloud