summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-16/+11
| | | | | | CodeGenModule. llvm-svn: 149943
* use cheaper llvm APIs for various bits of IR generation.Chris Lattner2012-02-061-17/+9
| | | | llvm-svn: 149916
* reapply the patches reverted in r149477, which enable ConstantDataArray.Chris Lattner2012-02-051-9/+9
| | | | llvm-svn: 149801
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-5/+5
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Revert r149363 which was part a series of commits that were reverted in llvmArgyrios Kyrtzidis2012-02-011-9/+9
| | | | | | | | | | | | | | | | | commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
* Support @compatibility_alias at run time (GNUstep Runtime)David Chisnall2012-01-311-0/+5
| | | | | | Patch by Niels Grewe! llvm-svn: 149401
* Don't zero terminate the bitmap twice.Benjamin Kramer2012-01-311-1/+1
| | | | llvm-svn: 149377
* ConstantArray::get() (for strings) is going away, useChris Lattner2012-01-311-9/+9
| | | | | | | | | | | | ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149363
* test for a v-table dispatch that consumes anFariborz Jahanian2012-01-301-2/+16
| | | | | | | argument. twik to support the test case. // rdar://10444476 llvm-svn: 149298
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-301-3/+52
| | | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. In this patch, the null path releases consumed argument. // rdar://10444474 llvm-svn: 149279
* revert r149184Fariborz Jahanian2012-01-291-17/+58
| | | | llvm-svn: 149205
* objc-arc: Perform null check on receiver before sending methods whichFariborz Jahanian2012-01-281-58/+17
| | | | | | | | consume one or more of their arguments. If not done, this will cause a leak as method will not consume the argument when receiver is null. // rdar://10444474 llvm-svn: 149184
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148577
* Make sure to initialize ExternalProtocolPtrTyDouglas Gregor2012-01-171-1/+2
| | | | llvm-svn: 148358
* Don't eagerly deserialize the 'Protocol' type when initializing codeDouglas Gregor2012-01-171-8/+19
| | | | | | generation for Objective-C; it may not be needed. llvm-svn: 148317
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-171-2/+0
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* objc++: some declarations related to atomicFariborz Jahanian2012-01-061-0/+27
| | | | | | | properties of c++ object types with non-trivial assignment copy. Not used yet. // rdar://6137845 llvm-svn: 147666
* Introduce the core infrastructure needed to model redeclaration chainsDouglas Gregor2012-01-011-0/+8
| | | | | | | | | | | | | | | for Objective-C protocols, including: - Using the first declaration as the canonical declaration - Using the definition as the primary DeclContext - Making sure that all declarations have a pointer to the definition data, and that we know which declaration is the definition - Serialization support for redeclaration chains and for adding definitions to already-serialized declarations. However, note that we're not taking advantage of much of this code yet, because we're still re-using ObjCProtocolDecls. llvm-svn: 147410
* Mark the calls to the _setjmp function as returns twice. ↵Bill Wendling2011-12-191-0/+2
| | | | | | <rdar://problem/10492556> llvm-svn: 146926
* Add bigger method type encodings to protocol objects. <rdar://problem/10492418>Bob Wilson2011-11-301-13/+70
| | | | | | | | | | | | | | | | | | The new metadata are method @encode strings with additional data. 1. Each Objective-C object is marked with its class name and protocol names. The same is done for property @encode already. 2. Each block object is marked with its function prototype's @encoding. For example, a method parameter that is a block object that itself returns void and takes an int would look like: @?<v@?i> These new method @encode strings are stored in a single array pointed to by structs protocol_t and objc_protocol_ext. Patch provided by Greg Parker! llvm-svn: 145469
* The _setjmp builtin library function should have the "returns twice"Bill Wendling2011-11-291-1/+2
| | | | | | | | attribute. This prevents the stack slot allocator from coming along and using a stack which it thinks is available but isn't. <rdar://problem/10492556> llvm-svn: 145332
* Add invariant.load metadata to loads from selector references. Allows these ↵Pete Cooper2011-11-101-1/+6
| | | | | | loads to later be moved/combined in the optimizer. Fixes <rdar://problem/6027699> llvm-svn: 144318
* In x86_64, when calling an Objective-C method that returns a _Complex long ↵Anders Carlsson2011-10-311-0/+27
| | | | | | double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil. llvm-svn: 143350
* Objective-c: fix an ir-gen crash where objc messag returns a _ComplexFariborz Jahanian2011-10-261-8/+24
| | | | | | | value and ABI requires return slot to be passed as first argument to message sent. // rdar://10331109 llvm-svn: 143053
* Replace vectors with arrays.Benjamin Kramer2011-10-151-64/+70
| | | | llvm-svn: 142072
* Constant expression evaluation refactoring:Richard Smith2011-10-101-3/+2
| | | | | | | | | | | - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. llvm-svn: 141561
* When performing an @throw in ARC, retain + autoreleaseJohn McCall2011-10-011-2/+2
| | | | | | | the pointer, being sure to do so before running cleanups associated with that full-expression. rdar://10042689 llvm-svn: 140945
* de-tmpify clang.Benjamin Kramer2011-09-271-15/+13
| | | | llvm-svn: 140637
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-1/+0
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-1/+1
| | | | llvm-svn: 140367
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-131-6/+6
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* Clean up our handling of Objective-C definitions in AST files. RatherDouglas Gregor2011-09-101-7/+0
| | | | | | | | | than having CodeGen check whether a declaration comes from an AST file (which it shouldn't know or care about), make sure that the AST writer and reader pass along "interesting" declarations that CodeGen needs to know about. llvm-svn: 139441
* Introduce a new predicate Decl::isFromASTFile() to determine whether aDouglas Gregor2011-09-091-1/+1
| | | | | | | | declaration was deserialized from an AST file. Use this instead of Decl::getPCHLevel() wherever possible. This is a simple step toward killing off Decl::getPCHLevel(). llvm-svn: 139427
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-4/+4
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* switch clang to use the new-new way of creating llvm::StructType's.Chris Lattner2011-08-121-96/+68
| | | | llvm-svn: 137472
* Encapsulate the Objective-C id/Class/SEL "redefinition" types inDouglas Gregor2011-08-111-2/+2
| | | | | | | | | ASTContext with accessors/mutators. The only functional change is that the AST writer won't bother writing the id/Class/SEL redefinition type if it hasn't been explicitly set; previously, it ended up being written as a synonym for the built-in id/Class/SEL. llvm-svn: 137349
* Simplify EH control flow by observing that EH scopes form a simpleJohn McCall2011-08-111-1/+0
| | | | | | | | | | | | | | | hierarchy of delegation, and that EH selector values are meaningful function-wide (good thing, too, or inlining wouldn't work). 2,3d 1a hierarchy of delegation and that EH selector values have the same meaning everywhere in the function instead of being meaningful only in the context of a specific selector. This removes the need for routing edges through EH cleanups, since a cleanup simply always branches to its enclosing scope. llvm-svn: 137293
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-25/+25
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to useJay Foad2011-07-221-1/+1
| | | | | | ArrayRef. llvm-svn: 135761
* Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.Jordy Rose2011-07-221-21/+18
| | | | | | | | | This was previously not-const only because it has to lazily construct a chain of ivars the first time it is called (and after the chain is invalidated). In practice, all the clients were just const_casting their const Decls; all those now-unnecessary const_casts have been removed. llvm-svn: 135741
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-2/+2
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-26/+26
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-8/+4
| | | | llvm-svn: 135265
* Generalize Cleanup::Emit's "isForEH" parameter into a setJohn McCall2011-07-121-1/+1
| | | | | | of flags. No functionality change. llvm-svn: 134997
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-254/+235
| | | | llvm-svn: 134831
* Eliminate most uses of ShallowCollectObjCIvars which requiresFariborz Jahanian2011-06-281-20/+19
| | | | | | | a vector for collection. Use iterators where needed instead. // rdar://6817577 llvm-svn: 134015
* Support for catching objc pointer objects in c++ catch-statementFariborz Jahanian2011-06-231-5/+13
| | | | | | in fragile abi mode and some other cleanups. // rdar://8940528 llvm-svn: 133747
* Alloa catching Objective-C id's being thrown with C++ throwFariborz Jahanian2011-06-221-8/+14
| | | | | | in Darwin's fragile abi mode. // rdar://8940528 llvm-svn: 133639
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-221-1/+1
| | | | | | that takes an ArrayRef. llvm-svn: 133615
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-201-35/+29
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
OpenPOWER on IntegriCloud