summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExprAgg.cpp
AgeCommit message (Collapse)Author
2009-11-20Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson
llvm-svn: 89467
2009-11-18Fix one last gotcha with typeid.Mike Stump
llvm-svn: 89172
2009-10-26Add Code gen support for '->*' operator which fellFariborz Jahanian
through the crack. llvm-svn: 85160
2009-10-23Eliminate QualifiedDeclRefExpr, which captured the notion of aDouglas Gregor
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-22Complete code gen for '.*' binary expression forFariborz Jahanian
both scalar and aggregates. llvm-svn: 84910
2009-10-18Use CK_BitCast for member function pointer casts. Fixes PR5138.Anders Carlsson
llvm-svn: 84438
2009-10-18add support for codegening CXXZeroInitValueExprsNuno Lopes
llvm-svn: 84418
2009-10-17Suppress -Asserts warning.Daniel Dunbar
llvm-svn: 84329
2009-10-13Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer
llvm-svn: 83964
2009-10-11Move the vtable builder to CGVtable.cpp, general cleanup.Anders Carlsson
llvm-svn: 83798
2009-10-03Pass the canonical method decl to GetVtableIndex. Fixes PR5120.Anders Carlsson
llvm-svn: 83272
2009-10-03Teach AggExprEmitter about pointers to member functions.Anders Carlsson
llvm-svn: 83266
2009-10-03Move some functions from CodeGenFunctions to CodeGenModule so they can be ↵Anders Carlsson
used by CGExprConstant. llvm-svn: 83263
2009-09-29Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.Anders Carlsson
llvm-svn: 83041
2009-09-29Improve support for member function pointers.Anders Carlsson
llvm-svn: 83039
2009-09-29Use a switch statement in VisitCastExpr.Anders Carlsson
llvm-svn: 83038
2009-09-24Refactor the representation of qualifiers to bring ExtQualType out of theJohn McCall
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-09If a cast expression needs either a conversion function or a constructor to ↵Anders Carlsson
be called, generate implicit child expressions that call them. llvm-svn: 81383
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
llvm-svn: 81346
2009-08-31Re-implemented generation of objc_memmove_collectableFariborz Jahanian
API for copying GC'able aggregates (Next runtime only). llvm-svn: 80607
2009-08-29Patch for code gen. for c-style cast which ends inFariborz Jahanian
using class's conversion functions [12.3.2-p2] llvm-svn: 80433
2009-08-26ir-gen for type convesion of class objects. WIP.Fariborz Jahanian
llvm-svn: 80178
2009-08-20Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian
"ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537
2009-08-18Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.Fariborz Jahanian
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-16Add an IsInitializer flag to EmitAnyExpr. This is used to prevent ↵Anders Carlsson
temporaries from being destroyed when they're bound to a reference variable. llvm-svn: 79179
2009-08-13Update for LLVM API change.Owen Anderson
llvm-svn: 78946
2009-08-07Add CK_ToUnion and use it for aggregate expression codegen.Anders Carlsson
llvm-svn: 78429
2009-07-31Update for LLVM API change.Owen Anderson
llvm-svn: 77722
2009-07-30Canonicalize else spacing.Mike Stump
llvm-svn: 77629
2009-07-29Update for LLVM API change.Owen Anderson
llvm-svn: 77514
2009-07-29Change uses of:Ted Kremenek
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
2009-07-24Update for LLVM API change.Owen Anderson
llvm-svn: 77012
2009-07-22Preserve address space information through member accesses, e.g., Mon P Wang
__attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1; ... = p1->arr[2]; // load from address space 1 llvm-svn: 76717
2009-07-17Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek
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
2009-07-17Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
2009-07-14Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson
llvm-svn: 75705
2009-07-13Update for LLVM API change.Owen Anderson
llvm-svn: 75446
2009-07-08Implement code generation of ChooseExpr for aggregate types.Anders Carlsson
llvm-svn: 75021
2009-07-08Implemented memmove_collectable API for Next runtimeFariborz Jahanian
when struct variables with GC'able members are copied into. Will provide a test case later. llvm-svn: 74984
2009-06-30De-ASTContext-ify DeclContext.Argyrios Kyrtzidis
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
2009-06-04Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ↵Anders Carlsson
ternary operator. llvm-svn: 72842
2009-06-03PR4316: Fix IRGen for cast-to-union extension.Eli Friedman
llvm-svn: 72803
2009-05-31Emit destructors correctly for temporaries.Anders Carlsson
llvm-svn: 72655
2009-05-30Add lvalue irgen support for CXXBindTemporaryExpr.Anders Carlsson
llvm-svn: 72649
2009-05-30More temporary support.Anders Carlsson
llvm-svn: 72648
2009-05-30Remove VarDecl from CXXConstructExpr.Anders Carlsson
llvm-svn: 72633
2009-05-29Fixup the rest of the trivial cases of the codegen of volatile. IfMike Stump
any body can spot codegen bugs with volatile, or knows of any in the bug database, let me know. llvm-svn: 72572
2009-05-28PR4281: Fix bogus CodeGen assertion. The issue is that Eli Friedman
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical types. llvm-svn: 72552
2009-05-27No write-barrier for initializations.Fariborz Jahanian
llvm-svn: 72492
2009-05-27IRgen support for calls to functions that return references to aggregate ↵Anders Carlsson
exressions. llvm-svn: 72479