aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
AgeCommit message (Collapse)Author
2009-11-20Fix lifetime of conditional temporaries. Patch by Victor Zverovich!Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-18Add an assertion to catch bad calls to EmitCallArgs.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89190 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-18Missing piece of r89173.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89174 91177308-0d34-0410-b5e6-96231b3b80d8
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-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-13Code gen for arrady delete operator. Fixes pr5472.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13Add a special BuildVirtualCall that's going to be used for building calls to ↵Anders Carlsson
destructors. This is needed because when compiling: struct A { virtual ~A(); }; void f(A* a) { delete a; } A's deleting destructor should be called. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10This patch implements Code gen. for destruction ofFariborz Jahanian
global array of objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10Add vtable caching to prevent multiple vtables for the same class fromMike Stump
being generated. Add the most derived vtable pointer to the VTT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-10Be sure to clear out VCall when we clear out VCalls.Mike Stump
Start implementing VTTs. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86650 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-11-06indirectbr seems to work! Rip out the old code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-04This patch extends CleanupScope to support destructionFariborz Jahanian
of array objects on block exit. Patch is by Anders Calrsson. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86032 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Refine volatile handling, specifically, we must have the canonicalMike Stump
type to look at the volatile specifier. I found these all from just hand auditing the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-03Refine return value adjustments for thunks.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85905 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-30Add CGException.cpp, to be used for exception related code generation.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-29optimize out some ifdefs.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28Implement clang support for indirect branch and address of labelChris Lattner
using the new LLVM support for this. This is temporarily hiding behind horrible and ugly #ifdefs until the time when the optimizer is stable (hopefully a week or so). Until then, lets make it "opt in" :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85446 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-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-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-21Prep work to always preallocate BlockDeclRefExprs so that we canMike Stump
generate the debug information for the first parameter to the block invoke functions. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84737 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-19Twinify CodeGenFunction::CreateTempAllocaDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13reimplement codegen for indirect goto with the following advantages:Chris Lattner
1. CGF now has fewer bytes of state (one pointer instead of a vector). 2. The generated code is determinstic, instead of getting labels in 'map order' based on pointer addresses. 3. Clang now emits one 'indirect goto switch' for each function, instead of one for each indirect goto. This fixes an M*N = N^2 IR size issue when there are lots of address-taken labels and lots of indirect gotos. 4. This also makes the default cause do something useful, reducing the size of the jump table needed (by one). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06Change GetAddressCXXOfBaseClass to use CXXBasePaths for calculating base ↵Anders Carlsson
class offsets. Fix the code to handle virtual bases as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03Implement code generation of member function pointer calls. Fixes PR5121.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-03Move some functions from CodeGenFunctions to CodeGenModule so they can be ↵Anders Carlsson
used by CGExprConstant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83041 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-27CodeGen for try statements. (We just emit the body for now).Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82910 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-23Add a new variant of EmitCXXAggrConstructorCall that takes a Value that ↵Anders Carlsson
holds the number of elements to construct, to be used when implementing new[]. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82602 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-14Remove an unnecessary FunctionDecl parameter to the synthesizing functions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81759 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-12Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a ↵Anders Carlsson
NullCheckValue argument (currently unused). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12For __block variables, cache the LLVM types as well as which LLVM field ↵Anders Carlsson
where the variable is stored. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81599 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Add basic covariant thunk generation support. WIP.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Pass GlobalDecls to GenerateCode and StartFunction.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81485 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
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05Install thunks later to fixup overrides. Track space taken by vbaseMike Stump
offsets better for thunk refinements. Cleanups. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81067 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04Add overidding for methods for vtable building for the secondaryMike Stump
vtables. Add thunk generation. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81014 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31Re-implemented generation of objc_memmove_collectableFariborz Jahanian
API for copying GC'able aggregates (Next runtime only). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80607 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26ir-gen for type convesion of class objects. WIP.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26Implement virtual dispatch. :-) This is self-consistent with clang,Mike Stump
but not yet necessarily perfectly consistent with gcc. Also addressed Doug and John's comments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-26Revert r80064 since it broke the build.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80066 91177308-0d34-0410-b5e6-96231b3b80d8