aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
AgeCommit message (Collapse)Author
2009-11-17More const is always good.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89033 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16Implement most of dynamic_cast. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88901 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-16Some minor cleanup for EmitCastLValue.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-15Implement typeid for class types.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88843 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14Handle CK_BitCast in EmitCastLValue.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88810 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Explicitly note that pre-inc/dec lvalues are not supported yet, so that itEli Friedman
doesn't crash. (Such expressions are valid in C++, but not in C.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08Add clarifying parens.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07Handle member expressions where the member declaration is actually a static ↵Anders Carlsson
variable. Fixes PR5392. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07More LValue related code cleanup.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07More cleanup, the code is much easier to follow now.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86412 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07Reduce nesting, no functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07We only need to call SetObjCNonGC for local variables. No functionality change.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended ↵Anders Carlsson
functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86407 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28random tidyingChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28adjust for a pending LLVM change.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-26Add Code gen support for '->*' operator which fellFariborz Jahanian
through the crack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85160 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-23Emit calls using the canonical prototype of the called function.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-22Complete code gen for '.*' binary expression forFariborz Jahanian
both scalar and aggregates. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84910 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84780 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21Code gen for pointer-to-datamember - WIP.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84771 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20Code-gen for CXXZeroInitValueExpr AST passedFariborz Jahanian
as argument to a function call. Removes a FIXME. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84694 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19Handle emitting the assignment operator when the lhs is a reference. Fixes ↵Anders Carlsson
PR5227. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19Twinify CodeGenFunction::CreateTempAllocaDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84456 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84451 91177308-0d34-0410-b5e6-96231b3b80d8
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-12There is no need to attach debug location info with alloca instruction.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06Add support to attach debug info to an instruction.Devang Patel
This is not yet enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83399 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83150 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-25Fixed another code gen bug in objc's new write-barrier API.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24Patch fixes a code gen. bug in generation of objc_assign_ivarFariborz Jahanian
(objc GC's API). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82724 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21Removed -fobjc-newgc-api option. clang now conforms toFariborz Jahanian
gcc-style write-barrier api only. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21Miscellanous fixes in generatation of objc gc's write-barriers.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82472 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16patch for generating objc'2 objc_assign_ivar. WIP.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82090 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82082 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16Removed a superfluous check before settingFariborz Jahanian
a flag (objc GC). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82052 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-15Code generation of Conditional operators that are lvalues (but that aren't ↵Anders Carlsson
bitfields). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81867 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81738 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12Handle CK_DerivedToBase when emitting lvalue casts.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12Add support for __block variables with alignment greater than __alignof(void *).Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinIDDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Set the calling convention based on the CGFunctionInfo.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-10GlobalDecl doesn't have an explicit constructor anymore.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81481 91177308-0d34-0410-b5e6-96231b3b80d8
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8