summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
AgeCommit message (Collapse)Author
2009-08-15minor cleanups for VLA stuff.Chris Lattner
llvm-svn: 79059
2009-08-13Update for LLVM API change.Owen Anderson
llvm-svn: 78946
2009-08-12Patch for synthesizing copy assignment operator.Fariborz Jahanian
WIP. llvm-svn: 78841
2009-08-10minor refactoring. No change otherwise.Fariborz Jahanian
llvm-svn: 78582
2009-08-09Improve handling of member pointers.Anders Carlsson
llvm-svn: 78536
2009-08-08Add support for global initializers.Anders Carlsson
llvm-svn: 78515
2009-08-08Refactoring of copy ctor ir-gen. No change in functionality.Fariborz Jahanian
llvm-svn: 78489
2009-08-07Synthesized copy constructor now generates code forFariborz Jahanian
copying non-virtual base classes which have non-trivial constructor. Work in progress. llvm-svn: 78436
2009-08-07More synthesis of copy constructors. Work in progress.Fariborz Jahanian
llvm-svn: 78402
2009-08-06Patch toward synthesizing copy constructors.Fariborz Jahanian
Work in progress. llvm-svn: 78355
2009-07-31Update for LLVM API change.Owen Anderson
llvm-svn: 77722
2009-07-30Synthesize the default constructor which has notFariborz Jahanian
been declared as needed. llvm-svn: 77641
2009-07-30Update for LLVM API changes.Owen Anderson
llvm-svn: 77638
2009-07-30Patch for future ir-gen for destructor calls.Fariborz Jahanian
llvm-svn: 77608
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-23Shield clang from LLVM API changes, until the dust settles.Daniel Dunbar
llvm-svn: 76862
2009-07-20Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.Fariborz Jahanian
llvm-svn: 76498
2009-07-20Early ir-gen for constructor prologue. This is on going.Fariborz Jahanian
llvm-svn: 76493
2009-07-20Remove an apparently unused header.Mike Stump
llvm-svn: 76473
2009-07-19Catch another trivial case where we can avoid emitting a separate return blcok.Daniel Dunbar
llvm-svn: 76365
2009-07-19Avoid generation of dead code in a few more situations.Daniel Dunbar
- Emit variable declarations as "simple", we want to avoid forcing the creation of a dummy basic block, but still need to make the variable available for later use. - With that, we can now skip IRgen for other unreachable statements (which don't define a label). - Anders, I added two fixmes on calls to EmitVLASize, can you check them? llvm-svn: 76361
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-16Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.Ted Kremenek
This method is intended to eventually replace the individual Type::getAsXXXType<> methods. The motivation behind this change is twofold: 1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of them are basically copy-and-paste. 2) By centralizing the implementation of the getAs<Type> logic we can more smoothly move over to Doug Gregor's proposed canonical type smart pointer scheme. Along with this patch: a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>. b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>. llvm-svn: 76098
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-08Update for IRBuilder API change.Owen Anderson
llvm-svn: 75041
2009-06-30Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis
subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
2009-06-30Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
2009-06-18Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor
llvm-svn: 73702
2009-05-31When possible, don't emit the cleanup block. Instead, just move the ↵Anders Carlsson
instructions to the current block. llvm-svn: 72654
2009-05-29Re-add a slightly more general version of the check from r72578; it is Eli Friedman
actually necessary in some obscure cases. llvm-svn: 72585
2009-05-29Oops, the testcase I was thinking of is supposed to error out. IMike Stump
tried other things that might trip, but they all worked. llvm-svn: 72584
2009-05-29Fixup codegen for composition of vla types using a normal array type.Mike Stump
llvm-svn: 72578
2009-05-16Reflow some comments.Mike Stump
llvm-svn: 71937
2009-04-26Implement function-try-blocks. However, there's a very subtle bug that I ↵Sebastian Redl
can't track down. llvm-svn: 70155
2009-04-23the logic for computing __func__ and friends is really broken:Chris Lattner
the type assigned by sema (and is visible with sizeof(__func__) for example) has nothing to do with what codegen ends up producing. We should eventually add a method on PredefinedExpr to handle this. In the meantime, just set up some framework and add some fixme's. llvm-svn: 69872
2009-04-21don't bother emitting a zero byte memset at all. We used to get themChris Lattner
in cases like this: typedef struct { short instance; char name[0]; } ATTR_LIST_ENTRY2; void test() { ATTR_LIST_ENTRY2 X = (ATTR_LIST_ENTRY2) { .instance = 7, }; } While it is safe to emit them, it is pretty silly. llvm-svn: 69687
2009-04-18FunctionDecl::getBody() is getting an ASTContext argument for use inDouglas Gregor
lazy PCH deserialization. Propagate that argument wherever it needs to be. No functionality change, except that I've tightened up a few PCH tests in preparation. llvm-svn: 69406
2009-04-15Simplify CodeGenFunction::GenerateCode.Anders Carlsson
llvm-svn: 69134
2009-04-13Update to use hasAttr() instead of getAttr().Daniel Dunbar
- No functionality change. llvm-svn: 68987
2009-04-10reject codegen of __thread variables as unimplemented, rdar://6775265Chris Lattner
llvm-svn: 68755
2009-04-04Add some basic support for generating C++ member functions.Anders Carlsson
llvm-svn: 68425
2009-03-31remove some obsolete comments, use an AssertingVH.Chris Lattner
llvm-svn: 68151
2009-03-28Move where block-related variables are initialized so that block Eli Friedman
types don't get generated when blocks aren't used. llvm-svn: 67898
2009-03-22fix CreateTempAlloca to not set a name on the alloca for temporariesChris Lattner
in release-assert builds. For automatic variables, explicitly set a name with setName that does not make a temporary std::string. This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6% llvm-svn: 67459
2009-03-17Initialize the cleanup.dst variable if necessary. Fixes PR3789.Anders Carlsson
llvm-svn: 67075
2009-03-07Codegen support for copy helpers for block literals.Mike Stump
llvm-svn: 66319