summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-13/+13
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* GCC didn't care for my attempt at API compatibility, so brute-force everythingJohn McCall2010-08-251-2/+2
| | | | | | to the new constants. llvm-svn: 112047
* Make use of __func__ in a block actually refer toFariborz Jahanian2010-08-131-6/+17
| | | | | | block's helper function. Fixes radar 7860965. llvm-svn: 110988
* More objc block variable layout info. work.Fariborz Jahanian2010-08-041-7/+18
| | | | llvm-svn: 110239
* Some early work for providing block layout info. Fariborz Jahanian2010-08-041-37/+10
| | | | | | for objective-c/c++ blocks (NeXt runtime). llvm-svn: 110213
* Fix flags in global block descriptor whenFariborz Jahanian2010-07-281-15/+22
| | | | | | | block returns structs. Fies radar 8241648. Executable test added to llvm test suite. llvm-svn: 109620
* IRgen: Move blocks runtime interfaces to CodeGenModule.Daniel Dunbar2010-07-161-47/+4
| | | | llvm-svn: 108481
* CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosingDaniel Dunbar2010-07-141-1/+1
| | | | | | | | whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI dependent. - <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug llvm-svn: 108379
* Validated by nightly-test runs on x86 and x86-64 darwin, including afterJohn McCall2010-07-061-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | self-host. Hopefully these results hold up on different platforms. I tried to keep the GNU ObjC runtime happy, but it's hard for me to test. Reimplement how clang generates IR for exceptions. Instead of creating new invoke destinations which sequentially chain to the previous destination, push a more semantic representation of *why* we need the cleanup/catch/filter behavior, then collect that information into a single landing pad upon request. Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional control flow) are generated, since it's actually fairly closely tied in with the former. Remove the need to track which cleanup scope a block is associated with. Document a lot of previously poorly-understood (by me, at least) behavior. The new framework implements the Horrible Hack (tm), which requires every landing pad to have a catch-all so that inlining will work. Clang no longer requires the Horrible Hack just to make exceptions flow correctly within a function, however. The HH is an unfortunate requirement of LLVM's EH IR. llvm-svn: 107631
* Remove unnecessary ASTContext parameter fromDouglas Gregor2010-07-011-2/+1
| | | | | | CXXRecordDecl::getDestructor(); no functionality change. llvm-svn: 107394
* Minor refactorin of my last patch (radar 7860965 related).Fariborz Jahanian2010-06-281-1/+1
| | | | llvm-svn: 107047
* Have __func__ and siblings point to block's implementation functionFariborz Jahanian2010-06-281-1/+12
| | | | | | name. Fixes radar 7860965. llvm-svn: 107044
* finally get around to doing a significant cleanup to irgen:Chris Lattner2010-06-271-12/+8
| | | | | | | | have CGF create and make accessible standard int32,int64 and intptr types. This fixes a ton of 80 column violations introduced by LLVMContextification and cleans up stuff a lot. llvm-svn: 106977
* Patch to correctly mangle block helper functionsFariborz Jahanian2010-06-241-4/+4
| | | | | | | when block literal is declared inside a ctor/dtor. Fixes radr 8096995. llvm-svn: 106700
* Block Code Gen. API. Call destructor on descriptiorFariborz Jahanian2010-06-081-2/+30
| | | | | | entry previously constructed via copy constructor. llvm-svn: 105641
* Fixed a block regression caused by trying to useFariborz Jahanian2010-06-071-4/+0
| | | | | | | | an existing ir for load of a bock variable. This cannot be done across basic blocks. Fixes radar 8064140. llvm-svn: 105549
* Build AST for copy-construction of copied-inFariborz Jahanian2010-06-041-22/+10
| | | | | | class object in blocks and carry it to IRGen. llvm-svn: 105487
* For C++ copied in objects, use copy constructors inFariborz Jahanian2010-06-041-7/+28
| | | | | | | | setting up block's descriptor. This is on going work to support c++ specific issues in setting up blocks various APIs. llvm-svn: 105469
* Block C++ code gen. Adds support for block reference argumentFariborz Jahanian2010-06-021-4/+14
| | | | | | | types. Executable test will be added to LLVM test suite. (radar 8041962). llvm-svn: 105347
* Fix compilation failureDouglas Gregor2010-05-251-2/+2
| | | | llvm-svn: 104613
* Improve name mangling for blocks and support mangling of static localDouglas Gregor2010-05-251-2/+3
| | | | | | | | | variables within blocks. We loosely follow GCC's mangling, but since these are always internal symbols the names don't really matter. I intend to revisit block mangling later, because GCC's mangling is rather verbose. <rdar://problem/8015719>. llvm-svn: 104610
* Add braces to avoid an ambiguous else, fixing a GCC warning.Chandler Carruth2010-05-211-1/+2
| | | | llvm-svn: 104314
* Allocate space in a block record for implicit references to the Objective CJohn McCall2010-05-211-82/+118
| | | | | | | | | | 'self' variable arising from uses of the 'super' keyword. Also reorganize some code so that BlockInfo (now CGBlockInfo) can be opaque outside of CGBlocks.cpp. Fixes rdar://problem/8010633. llvm-svn: 104312
* Support implicitly closing on 'this' in a block. Fixed PR7165.John McCall2010-05-201-128/+173
| | | | | | (the codegen works here, too, but that's annoying to test without execution) llvm-svn: 104202
* It's bad form to create VarDecl's without DeclContextsDouglas Gregor2010-05-111-1/+3
| | | | llvm-svn: 103484
* Fixes a code gen crash when block is a reference type, etc.Fariborz Jahanian2010-05-041-0/+2
| | | | | | (radar 7495203). llvm-svn: 103022
* When synthesizing Objective C records, give the synthetic fields publicJohn McCall2010-04-301-1/+1
| | | | | | | | access. Fixes an assertion. Fixes rdar://problem/7927811. Too lazy to reduce a test case. llvm-svn: 102776
* Keep track of the actual storage specifier written on a variable orDouglas Gregor2010-04-191-8/+14
| | | | | | | | function declaration, since it may end up being changed (e.g., "extern" can become "static" if a prior declaration was static). Patch by Enea Zaffanella and Paolo Bolzoni. llvm-svn: 101826
* Minor include pruning.Benjamin Kramer2010-03-311-0/+1
| | | | llvm-svn: 100007
* the big refactoring bits of PR3782.Rafael Espindola2010-03-301-10/+9
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* add support for a 1<<29 bit in the block flags field to mark blocks using ↵Blaine Garst2010-03-051-2/+15
| | | | | | alternate struct return ABI llvm-svn: 97775
* Unconditionally support block introspection data in a new field at the endBlaine Garst2010-02-231-53/+44
| | | | | | | | | | | | | | | of the block descriptor field. This field is the ObjC style @encode signature of the implementation function, and was to this point conditionally provided in the block literal data structure. That provisional support is removed. Additionally, eliminate unused enumerations for the block literal flags field. The first shipping ABI unconditionally set (1<<29) but this bit is unused by the runtime, so the second ABI will unconditionally have (1<<30) set so that the runtime can in fact distinguish whether the additional data is present or not. llvm-svn: 96989
* remove unused function & enumerationsBlaine Garst2010-02-191-34/+0
| | | | llvm-svn: 96635
* Patch to remove arbitrary imporation of 'self' intoFariborz Jahanian2010-02-171-13/+0
| | | | | | | | a block without it being used. This causes over release of objects in certain runtime-senitive apps. (fixes radar 7581175). llvm-svn: 96501
* Did not intend to check this in.Fariborz Jahanian2010-02-171-2/+0
| | | | llvm-svn: 96486
* Use proper lexcial context for newly added ivars.Fariborz Jahanian2010-02-171-0/+2
| | | | llvm-svn: 96484
* Generate the objc_read_weak API when callingFariborz Jahanian2010-02-101-1/+16
| | | | | | a __weak block. Fixes radar 7628591. llvm-svn: 95822
* Standardize the parsing of function type attributes in a way thatJohn McCall2010-02-051-7/+11
| | | | | | | | | | | | follows (as conservatively as possible) gcc's current behavior: attributes written on return types that don't apply there are applied to the function instead, etc. Only parse CC attributes as type attributes, not as decl attributes; don't accepet noreturn as a decl attribute on ValueDecls, either (it still needs to apply to other decls, like blocks). Consistently consume CC/noreturn information throughout codegen; enforce this by removing their default values in CodeGenTypes::getFunctionInfo(). llvm-svn: 95436
* Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,Ken Dyck2010-01-271-2/+1
| | | | | | | now that the "InBytes" part of the name is implied by the return type, rename it to getDeclAlign(). llvm-svn: 94681
* Use CharUnits for alignments in character units.Ken Dyck2010-01-261-11/+13
| | | | llvm-svn: 94571
* Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store sizeKen Dyck2010-01-261-5/+4
| | | | | | of LLVM types in character units. llvm-svn: 94542
* simplify code.Chris Lattner2010-01-251-4/+3
| | | | llvm-svn: 94401
* Simplify code.Benjamin Kramer2010-01-221-18/+8
| | | | llvm-svn: 94175
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-111-27/+33
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* Pass the return value slot to all call exprs.Anders Carlsson2009-12-241-2/+3
| | | | llvm-svn: 92145
* Pass ReturnValueSlot to EmitCall. No functionality change yet.Anders Carlsson2009-12-241-1/+1
| | | | llvm-svn: 92138
* DeclRefExpr stores a ValueDecl internally.John McCall2009-12-081-1/+1
| | | | | | Template instantiation can re-use DeclRefExprs. llvm-svn: 90848
* various cleanups.Chris Lattner2009-12-051-9/+11
| | | | llvm-svn: 90657
* Don't pass false (default) for isVolatile parameter to CreateLoad.Daniel Dunbar2009-11-291-5/+5
| | | | llvm-svn: 90098
* Centralize and complete the computation of value- and type-dependence for ↵Douglas Gregor2009-11-231-3/+3
| | | | | | DeclRefExprs llvm-svn: 89649
OpenPOWER on IntegriCloud