summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGExpr.cpp
AgeCommit message (Collapse)Author
2009-11-07Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended ↵Anders Carlsson
functionality change. llvm-svn: 86407
2009-10-28random tidyingChris Lattner
llvm-svn: 85408
2009-10-28adjust for a pending LLVM change.Chris Lattner
llvm-svn: 85373
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-23Emit calls using the canonical prototype of the called function.John McCall
llvm-svn: 84947
2009-10-22Complete code gen for '.*' binary expression forFariborz Jahanian
both scalar and aggregates. llvm-svn: 84910
2009-10-21Expand on code gen. for pointer to data members so it worksFariborz Jahanian
for base classe members as well. Test case enhanced for this. llvm-svn: 84780
2009-10-21Code gen for pointer-to-datamember - WIP.Fariborz Jahanian
llvm-svn: 84771
2009-10-20Code-gen for CXXZeroInitValueExpr AST passedFariborz Jahanian
as argument to a function call. Removes a FIXME. llvm-svn: 84694
2009-10-19Handle emitting the assignment operator when the lhs is a reference. Fixes ↵Anders Carlsson
PR5227. llvm-svn: 84518
2009-10-19Twinify CodeGenFunction::CreateTempAllocaDaniel Dunbar
llvm-svn: 84456
2009-10-18When binding a reference to a temporary, it's important that other ↵Anders Carlsson
temporaries created as on the RHS are destroyed before emitting the dtor for the temporary. llvm-svn: 84451
2009-10-15HandleAnders Carlsson
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-13Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer
llvm-svn: 83964
2009-10-12There is no need to attach debug location info with alloca instruction.Devang Patel
llvm-svn: 83913
2009-10-06Add support to attach debug info to an instruction.Devang Patel
This is not yet enabled. llvm-svn: 83399
2009-09-30<rdar://problem/7263113> Make clang produce gcc's objc_assign_StrongCast as ↵Fariborz Jahanian
a result of type-cast of an ivar in assignment. llvm-svn: 83150
2009-09-25Fixed another code gen bug in objc's new write-barrier API.Fariborz Jahanian
llvm-svn: 82735
2009-09-24Patch fixes a code gen. bug in generation of objc_assign_ivarFariborz Jahanian
(objc GC's API). llvm-svn: 82724
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-21Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall
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-21Removed -fobjc-newgc-api option. clang now conforms toFariborz Jahanian
gcc-style write-barrier api only. llvm-svn: 82493
2009-09-21Miscellanous fixes in generatation of objc gc's write-barriers.Fariborz Jahanian
llvm-svn: 82472
2009-09-18Fixed a bug in generation of the new write-barriers when Fariborz Jahanian
array syntax is used to derefernce and assign to ivar pointee. llvm-svn: 82183
2009-09-16patch for generating objc'2 objc_assign_ivar. WIP.Fariborz Jahanian
llvm-svn: 82090
2009-09-16Starting patch to generate more specific API for objc'sFariborz Jahanian
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-16Removed a superfluous check before settingFariborz Jahanian
a flag (objc GC). llvm-svn: 82052
2009-09-15Code generation of Conditional operators that are lvalues (but that aren't ↵Anders Carlsson
bitfields). llvm-svn: 81867
2009-09-14Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.Anders Carlsson
llvm-svn: 81738
2009-09-12Don't use the PredefinedExpr string as the global variable name, these don'tDaniel Dunbar
make very nice symbols, just use the function name. llvm-svn: 81653
2009-09-12Handle CK_DerivedToBase when emitting lvalue casts.Anders Carlsson
llvm-svn: 81614
2009-09-12Add support for __block variables with alignment greater than __alignof(void *).Anders Carlsson
llvm-svn: 81602
2009-09-12Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinIDDouglas Gregor
llvm-svn: 81590
2009-09-11Set the calling convention based on the CGFunctionInfo.Daniel Dunbar
llvm-svn: 81582
2009-09-10GlobalDecl doesn't have an explicit constructor anymore.Anders Carlsson
llvm-svn: 81481
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-09-09Reflow comments and some minor whitespace fixups.Mike Stump
llvm-svn: 81337
2009-09-08Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam ↵Anders Carlsson
Weinig! llvm-svn: 81237
2009-09-04Implement AST, semantics, and CodeGen for C++ pseudo-destructorDouglas Gregor
expressions, e.g., p->~T() when p is a pointer to a scalar type. We don't currently diagnose errors when pseudo-destructor expressions are used in any way other than by forming a call. llvm-svn: 81009
2009-09-01Handle member expressions that return references correctly.Anders Carlsson
llvm-svn: 80723
2009-09-01Fixed a property getter ir-gen crash.Fariborz Jahanian
llvm-svn: 80681
2009-08-31Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocateDouglas Gregor
space within the MemberExpr for the nested-name-specifier and its source range. We'll do the same thing with explicitly-specified template arguments, assuming I don't flip-flop again. llvm-svn: 80642
2009-08-31Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we willDouglas Gregor
also be adding explicit template arguments as an additional "adornment". No functionality change. llvm-svn: 80628
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-28ir-gen related patch for type conversionFariborz Jahanian
with class type conversion methods. WIP. llvm-svn: 80365
2009-08-27Clean up CodeGenFunction::EmitCastLValue to use the cast kind. Error Eli Friedman
out for user-defined conversions instead of crashing. llvm-svn: 80282
2009-08-26When a member reference expression includes a qualifier on the memberDouglas Gregor
name, e.g., x->Base::f() retain the qualifier (and its source range information) in a new subclass of MemberExpr called CXXQualifiedMemberExpr. Provide construction, transformation, profiling, printing, etc., for this new expression type. When a virtual function is called via a qualified name, don't emit a virtual call. Instead, call that function directly. Mike, could you add a CodeGen test for this, too? llvm-svn: 80167
2009-08-20Using "ObjCImplicitSetterGetterRefExpr" instead of ↵Fariborz Jahanian
"ObjCImplctSetterGetterRefExpr". A field rename and more comments. llvm-svn: 79537