summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjCXX/lambda-expressions.mm
Commit message (Collapse)AuthorAgeFilesLines
* Compute 'this' correctly for block in lambda.Eli Friedman2013-07-121-0/+18
| | | | | | | | | Using CurFuncDecl is both correct and simple compared to crawling the DeclContexts of the block. Fixes <rdar://problem/14415072>. llvm-svn: 186210
* Followup to r183931 to fix the lambda conversion-to-block-pointer member.Eli Friedman2013-06-131-1/+10
| | | | llvm-svn: 183942
* Correctly emit certain implicit references to 'self' even withinJohn McCall2013-05-031-0/+22
| | | | | | | | | | | | | | | | | | a lambda. Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation functions. Fix that by generally improving getNonClosureContext to look through lambdas and captured statements but only report code contexts, which is generally what's wanted. Audit uses of CurFuncDecl and getNonClosureAncestor for correctness. Bug #2 is that lambdas weren't specially mapping 'self' when inside an ObjC method. Fix that by removing the requirement for that and using the normal EmitDeclRefLValue path in LoadObjCSelf. rdar://13800041 llvm-svn: 181000
* Reapply r176133 with testcase fixes.Bill Wendling2013-02-271-9/+4
| | | | llvm-svn: 176145
* Revert "Add more attributes from the command line to functions."Anna Zaks2013-02-251-4/+9
| | | | | | | | This reverts commit 176009. The commit is a likely cause of several buildbot failures. llvm-svn: 176044
* Add more attributes from the command line to functions.Bill Wendling2013-02-251-9/+4
| | | | | | | This is an ongoing process. Any command line option which a back-end cares about should be added here. llvm-svn: 176009
* Modify the tests to use attribute group references instead of listing theBill Wendling2013-02-201-2/+11
| | | | | | function attributes. llvm-svn: 175606
* Add the 'target-cpu' and 'target-features' attributes to functions.Bill Wendling2013-02-151-2/+2
| | | | | | | The back-end will use these values to reconfigure code generation for different features. llvm-svn: 175308
* block literal irgen: several improvements on naming blockFariborz Jahanian2012-06-261-5/+5
| | | | | | | | | | | | literal helper functions. All helper functions (global and locals) use block_invoke as their prefix. Local literal helper names are prefixed by their enclosing mangled function names. Blocks in non-local initializers (e.g. a global variable or a C++11 field) are prefixed by their mangled variable name. The descriminator number added to end of the name starts off with blank (for first block) and _<N> (for the N+2-th block). llvm-svn: 159206
* Make CodeGenFunction::EmitBlockCopyAndAutorelease actually do what its name ↵Eli Friedman2012-03-011-0/+2
| | | | | | says. llvm-svn: 151853
* Implement "optimization" for lambda-to-block conversion which inlines the ↵Eli Friedman2012-03-011-0/+19
| | | | | | | | generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap. Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed. llvm-svn: 151797
* Basic coverage test for conversion-to-block-pointer for lambda expressions.Eli Friedman2012-02-281-0/+18
llvm-svn: 151616
OpenPOWER on IntegriCloud