summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
AgeCommit message (Collapse)Author
2009-03-06Framework for codegen for copy/dispose helpers.Mike Stump
llvm-svn: 66231
2009-03-05Add codegen support for __block variables to call _Block_object_dispose as ↵Mike Stump
necessary. llvm-svn: 66117
2009-03-04Move some of the CodeGenFunction blocks code up and out. NoMike Stump
functionality change. llvm-svn: 66048
2009-02-26Create a new TypeNodes.def file that enumerates all of the types,Douglas Gregor
giving them rough classifications (normal types, never-canonical types, always-dependent types, abstract type representations) and making it far easier to make sure that we've hit all of the cases when decoding types. Switched some switch() statements on the type class over to using this mechanism, and filtering out those things we don't care about. For example, CodeGen should never see always-dependent or non-canonical types, while debug info generation should never see always-dependent types. More switch() statements on the type class need to be moved over to using this approach, so that we'll get warnings when we add a new type then fail to account for it somewhere in the compiler. As part of this, some types have been renamed: TypeOfExpr -> TypeOfExprType FunctionTypeProto -> FunctionProtoType FunctionTypeNoProto -> FunctionNoProtoType There shouldn't be any functionality change... llvm-svn: 65591
2009-02-26Add Type::hasPointerRepresentation predicate.Daniel Dunbar
- For types whose native representation is a pointer. - Use to replace ExprConstant.cpp:HasPointerEvalType, CodeGenFunction::isObjCPointerType. llvm-svn: 65569
2009-02-26Drop uses of isPointerLikeType.Daniel Dunbar
- No functionality change. llvm-svn: 65560
2009-02-25CodeGen support for copied BlockDeclRefExprs.Mike Stump
llvm-svn: 65487
2009-02-25Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating theDaniel Dunbar
global variable) out of GenerateStaticBlockVarDecl. - No intended functionality change. - Prep for some mild cleanups and PR3662. llvm-svn: 65466
2009-02-23Add low level support for generating invoke instead of calls.Daniel Dunbar
- No functionality change. llvm-svn: 65325
2009-02-21Add CodeGen support for the helper for BlockDeclRefExprs. The easierMike Stump
stuff is mostly done. Move BlockHasCopyDispose up. llvm-svn: 65242
2009-02-18Address Chris's comments regarding C++ name mangling.Douglas Gregor
llvm-svn: 64984
2009-02-13Add CodeGen support for the nodebug attribute.Anders Carlsson
llvm-svn: 64445
2009-02-13Add basic support for C++ name mangling according to the Itanium C++Douglas Gregor
ABI to the CodeGen library. Since C++ code-generation is so incomplete, we can't exercise much of this mangling code. However, a few smoke tests show that it's doing the same thing as GCC. When C++ codegen matures, we'll extend the ABI tester to verify name-mangling as well, and complete the implementation here. At this point, the major client of name mangling is in the uses of the new "overloadable" attribute in C, which allows overloading. Any "overloadable" function in C (or in an extern "C" block in C++) will be mangled the same way that the corresponding C++ function would be mangled. llvm-svn: 64413
2009-02-10Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.Daniel Dunbar
llvm-svn: 64235
2009-02-10Remove the last remnants of the Obj-C EH stack code.Anders Carlsson
llvm-svn: 64205
2009-02-09Add DidCallStackSave variable to CodeGenFunction.Anders Carlsson
llvm-svn: 64156
2009-02-08Reuse case destinations.Anders Carlsson
llvm-svn: 64100
2009-02-08Always check if we can remove branch fixups, even if the cleanup stack is empty.Anders Carlsson
llvm-svn: 64099
2009-02-08Misc fixes to the cleanup stack code.Anders Carlsson
llvm-svn: 64096
2009-02-08More cleanup stack work, PopCleanupBlock now returns a struct with the ↵Anders Carlsson
switch block and end block. llvm-svn: 64072
2009-02-08Split some functions upAnders Carlsson
llvm-svn: 64069
2009-02-08CleanupScope needs to push the cleanup block in its destructorAnders Carlsson
llvm-svn: 64068
2009-02-08Implement support for branch fixups.Anders Carlsson
llvm-svn: 64064
2009-02-08More cleanup stack work.Anders Carlsson
llvm-svn: 64059
2009-02-08When emitting blocks, keep track of which cleanup scope they have. Minor ↵Anders Carlsson
fixes and cleanup. llvm-svn: 64053
2009-02-07Add support for emitting cleanup blocks. Make EmitCompoundStatement emit ↵Anders Carlsson
cleanup blocks if necessary llvm-svn: 64051
2009-02-07Add plumbing for the cleanup stack.Anders Carlsson
llvm-svn: 64043
2009-02-07Fixup goto codegen in and around VLAs.Mike Stump
llvm-svn: 64014
2009-02-05Follow Eli's advice and store the VLA size with the native size_t type. ↵Anders Carlsson
Fixes PR3491. llvm-svn: 63879
2009-02-03Add CodeGenFunction::ConvertTypeForMem forwarding function.Daniel Dunbar
llvm-svn: 63678
2009-02-02Thread CGFunctionInfo construction through CodeGenTypes.Daniel Dunbar
- Inefficient & leaks memory currently, will be cleaned up subsequently. llvm-svn: 63567
2009-02-02More ABI API cleanup.Daniel Dunbar
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and EmitFunction{Epi,Pro}log. llvm-svn: 63553
2009-01-26Pull EmitReturnBlock out of FinishFunction and catch unified returnDaniel Dunbar
case correctly. llvm-svn: 63068
2009-01-26Skip emission of final return block if possible (e.g., functions withDaniel Dunbar
a unified return). llvm-svn: 63038
2009-01-20Slight cleanup, and fix for va_arg on architectures where va_list is a Eli Friedman
struct. llvm-svn: 62585
2009-01-09Block pointer types are not aggregate types.Daniel Dunbar
llvm-svn: 61973
2008-12-20Handle typedefs to VLAs (Emit the size expr when we encounter the typedefAnders Carlsson
llvm-svn: 61290
2008-12-20Make sure to generate code for arguments that have a variably modified type.Anders Carlsson
llvm-svn: 61288
2008-12-20Change EmitVLASize to take a QualType that must be a variably modified type.Anders Carlsson
Emit the size even if the declared type is a variably modified type. This lets us handle void f(int n) { int (*a)[n]; printf("size: %d\n", sizeof(*a)); } llvm-svn: 61285
2008-12-20Split up emitting of VLA sizes and getting the size of a VLA.Anders Carlsson
llvm-svn: 61284
2008-12-12Add map of VLA types and their sizesAnders Carlsson
llvm-svn: 60939
2008-12-01Change more code over to using the new Expr::EvaluateAnders Carlsson
llvm-svn: 60324
2008-11-24Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make itChris Lattner
assert if the name is not an identifier. Update callers to do the right thing and avoid this method in unsafe cases. This also fixes an objc warning that was missing a space, and migrates a couple more to taking IdentifierInfo and QualTypes instead of std::strings. llvm-svn: 59936
2008-11-22An expression is not foldable if it can't be fully evaluated. Fixes PR3060Anders Carlsson
llvm-svn: 59887
2008-11-17Introduction the DeclarationName class, as a single, general method ofDouglas Gregor
representing the names of declarations in the C family of languages. DeclarationName is used in NamedDecl to store the name of the declaration (naturally), and ObjCMethodDecl is now a NamedDecl. llvm-svn: 59441
2008-11-16rename Expr::tryEvaluate to Expr::Evaluate.Chris Lattner
llvm-svn: 59426
2008-11-13Normalize many BasicBlock names.Daniel Dunbar
- Use dotted notation for blocks related to a particular statement type. - Use .end for landing pads. No functionality change in NDEBUG mode. :) llvm-svn: 59210
2008-11-12Quick fix for crash in IRgen when we can tryEvaluate a condition toDaniel Dunbar
something that is not an int. - Ignore these cases for now, added FIXME that we should also boolize them. llvm-svn: 59184
2008-11-12Handle ?: in EmitBranchOnBoolExpr.Daniel Dunbar
llvm-svn: 59129
2008-11-12Handle Unary ! in EmitBranchOnBoolExpr, so that we can efficientlyChris Lattner
codegen stuff like "if (!(X && Y))" llvm-svn: 59115