summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Patch to build class meta-data for each implementation Fariborz Jahanian2009-01-241-9/+44
| | | | | | of class in objc2's nonfragile abi. llvm-svn: 62935
* This patch builds the meta-class object for each Fariborz Jahanian2009-01-241-75/+171
| | | | | | implemented class in objc2's nonfrigile abi. llvm-svn: 62929
* Some very early work for new objc's Fariborz Jahanian2009-01-231-11/+208
| | | | | | meta-data generation. llvm-svn: 62894
* Checked in an oops!Fariborz Jahanian2009-01-231-1/+2
| | | | llvm-svn: 62853
* Another missing LLVM type for objc2's new abi defined.Fariborz Jahanian2009-01-231-3/+12
| | | | llvm-svn: 62852
* Define LLVM types for nonfragile abi metadata.Fariborz Jahanian2009-01-231-25/+158
| | | | llvm-svn: 62830
* Use NonFragileABI as name of new Next abi. More comments Fariborz Jahanian2009-01-221-56/+118
| | | | | | for the new meta-data. llvm-svn: 62806
* More refactoring of common API to the common class forFariborz Jahanian2009-01-221-93/+104
| | | | | | the two Next's objc runtimes. More comments. llvm-svn: 62735
* Moved whole bunch of common APIs to the common class.Fariborz Jahanian2009-01-211-37/+37
| | | | | | No change in functionality. llvm-svn: 62729
* Refactoring ObjC Next's runtime classes in preparation forFariborz Jahanian2009-01-211-74/+123
| | | | | | the new ObjC's abi. llvm-svn: 62721
* Commented objective-c's metadata types. Minor clean up.Fariborz Jahanian2009-01-211-5/+89
| | | | | | No change in functionality. llvm-svn: 62646
* Remove ScopedDecl, collapsing all of its functionality into Decl, soDouglas Gregor2009-01-201-2/+2
| | | | | | | | | | | | | | | | that every declaration lives inside a DeclContext. Moved several things that don't have names but were ScopedDecls (and, therefore, NamedDecls) to inherit from Decl rather than NamedDecl, including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't store empty DeclarationNames for these things, nor do we try to insert them into DeclContext's lookup structure. The serialization tests are temporarily disabled. We'll re-enable them once we've sorted out the remaining ownership/serialiazation issues between DeclContexts and TranslationUnion, DeclGroups, etc. llvm-svn: 62562
* Patch to re-implement ivar-list meta-data generation to fixFariborz Jahanian2009-01-171-11/+31
| | | | | | cases of unnamed ivar bitfields. llvm-svn: 62429
* Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr RakDouglas Gregor2009-01-121-8/+4
| | | | llvm-svn: 62122
* (LLVM up) Match TargetData API change in LLVM TOT.Daniel Dunbar2009-01-121-7/+7
| | | | llvm-svn: 62101
* Convert property implementation to DeclContext::addDecl().Steve Naroff2009-01-111-16/+9
| | | | | | This completes the ObjCContainerDecl AST cleanup (for now). llvm-svn: 62037
* This patch fixes the code gen failures which was a fallout fromFariborz Jahanian2009-01-101-4/+9
| | | | | | | | not merging protocol properties into the classes which use those protocols. With this patch, all my exceutable test pass again. llvm-svn: 62030
* Provide a new kind of iterator, the specific_decl_iterator, thatDouglas Gregor2009-01-091-1/+1
| | | | | | | | | filters the decls seen by decl_iterator with two criteria: the dynamic type of the declaration and a run-time predicate described by a member function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl considerably. It has no measurable performance impact. llvm-svn: 61994
* Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).Steve Naroff2009-01-091-6/+6
| | | | | | | | | Add isa/cast/dyncast support for ObjCContainerDecl. Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing). More simplifications to Sema::ActOnAtEnd()... Added/changed some FIXME's as a result of the above work. llvm-svn: 61988
* Another nasty code gen. bug with trivial fix. Calling classFariborz Jahanian2009-01-071-1/+3
| | | | | | | method on 'super' receiver in a category implementation. Other simpler cases were working by accident. llvm-svn: 61880
* More encoding support. This time forFariborz Jahanian2008-12-191-1/+1
| | | | | | @encode of classes and bitfields. llvm-svn: 61268
* Code gen. for ivar references; including bitfieldFariborz Jahanian2008-12-151-2/+5
| | | | | | ivars. llvm-svn: 61043
* Unifies the name-lookup mechanisms used in various parts of the ASTDouglas Gregor2008-12-111-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and separates lexical name lookup from qualified name lookup. In particular: * Make DeclContext the central data structure for storing and looking up declarations within existing declarations, e.g., members of structs/unions/classes, enumerators in C++0x enums, members of C++ namespaces, and (later) members of Objective-C interfaces/implementations. DeclContext uses a lazily-constructed data structure optimized for fast lookup (array for small contexts, hash table for larger contexts). * Implement C++ qualified name lookup in terms of lookup into DeclContext. * Implement C++ unqualified name lookup in terms of qualified+unqualified name lookup (since unqualified lookup is not purely lexical in C++!) * Limit the use of the chains of declarations stored in IdentifierInfo to those names declared lexically. * Eliminate CXXFieldDecl, collapsing its behavior into FieldDecl. (FieldDecl is now a ScopedDecl). * Make RecordDecl into a DeclContext and eliminates its Members/NumMembers fields (since one can just iterate through the DeclContext to get the fields). llvm-svn: 60878
* Append an extra newline to the module inline asm if it's not empty.Anders Carlsson2008-12-101-0/+5
| | | | llvm-svn: 60827
* Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of Chris Lattner2008-11-241-28/+23
| | | | | | | | | | | uses of getName() with uses of getDeclName(). This upgrades a bunch of diags to take DeclNames instead of std::strings. This also tweaks a couple of diagnostics to be cleaner and changes CheckInitializerTypes/PerformInitializationByConstructor to pass around DeclarationNames instead of std::strings. llvm-svn: 59947
* Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make itChris Lattner2008-11-241-4/+3
| | | | | | | | | 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
* Rename Selector::getName() to Selector::getAsString(), and addChris Lattner2008-11-241-9/+8
| | | | | | | | | | | | | a new NamedDecl::getAsString() method. Change uses of Selector::getName() to just pass in a Selector where possible (e.g. to diagnostics) instead of going through an std::string. This also adds new formatters for objcinstance and objcclass as described in the dox. llvm-svn: 59933
* Fixed bugzilla bug# 3095 related to code gen. for @synchronized.Fariborz Jahanian2008-11-211-7/+11
| | | | llvm-svn: 59838
* Consolidated @try and @synchronize into a singleFariborz Jahanian2008-11-211-101/+36
| | | | | | code gen. method. llvm-svn: 59767
* Introducing objc_assign_ivar to clang.Fariborz Jahanian2008-11-201-0/+23
| | | | llvm-svn: 59740
* Few more changes due to Daniel's feedback.Fariborz Jahanian2008-11-191-0/+7
| | | | llvm-svn: 59645
* Generate strong write barriers for __strong objects.Fariborz Jahanian2008-11-191-0/+26
| | | | | | Also, took care of Daniel's commments. llvm-svn: 59575
* Patch for generation of weak write barriers for objcFariborz Jahanian2008-11-181-4/+17
| | | | | | __weak objects. llvm-svn: 59560
* Generate objc_read_weak for __weak objc loads.Fariborz Jahanian2008-11-181-1/+13
| | | | llvm-svn: 59553
* Some basic support toward objective-c's GC code gen.Fariborz Jahanian2008-11-181-0/+47
| | | | llvm-svn: 59543
* Introduction the DeclarationName class, as a single, general method ofDouglas Gregor2008-11-171-3/+3
| | | | | | | | 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
* Start implementing support for @synchonized with the darwin ObjC API.Chris Lattner2008-11-151-1/+116
| | | | | | Patch by Fariborz! llvm-svn: 59377
* Rework IRgen invariant w.r.t. current insert point.Daniel Dunbar2008-11-111-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - EmitStmt is no longer required to finish with a current insertion point defined (i.e. it does not need to make dummy blocks). Instead, it can clear the insertion point in the builder which indicates that the current insertion point is unreachable. - CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint which respectively test if there is an insert point and ensure an insertion point exists (by making a dummy block). - Clearly mark functions in CodeGenFunction which can be called with no insertion point defined. Currently this is a limited set, and EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR. Remove EmitDummyBlock, which is no longer needed. Clients who haven't already cleared the insertion point (typically via EmitBranch) can do so by hand. Remove isDummyBlock, which has effectively been renamed to HaveInsertPoint. The main thrust of this change is that we no longer have create dummy blocks just to destroy them a short time later in EmitBlock in the common case that there is no unreachable code following something like a goto. Additionally, this means that we are not using the hokey condition in isDummyBlock that a block without a name is a dummy block. Guess how well that works when we never emit block names! llvm-svn: 59089
* Add CodeGenFunction::EmitBranch.Daniel Dunbar2008-11-111-1/+1
| | | | | | | - Emits an unconditional branch, with extra logic to avoid generating spurious branches out of dummy blocks. llvm-svn: 59037
* Add CodeGenFunction::EmitDummyBlock for marking places where we makeDaniel Dunbar2008-11-111-1/+1
| | | | | | | "dummy" blocks (blocks just used to make sure we have a place to dump code to). llvm-svn: 59022
* Centralize basic block creation in CodeGenFunction::createBasicBlock.Daniel Dunbar2008-11-111-12/+12
| | | | | | - No functionality change. llvm-svn: 59017
* Move IRBuilder type definition to common file.Daniel Dunbar2008-11-011-11/+10
| | | | | | - No functionality change. llvm-svn: 58546
* NeXT: Emit protocol objects lazily.Daniel Dunbar2008-10-291-21/+76
| | | | | | | | | | - That is, the metadata for a protocol is only emitted if that protocol is actually used in the translation unit. This is important because Objective-C headers frequently contain a large number of protocol definitions, only a few of which will be used in any given file. llvm-svn: 58400
* Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.Daniel Dunbar2008-10-171-6/+2
| | | | llvm-svn: 57716
* More Obj-C type encoding improvements.Daniel Dunbar2008-10-171-1/+2
| | | | | | | - Encode unions and bit-fields correctly. - Accept option to name record fields (used for NeXT runtime). llvm-svn: 57685
* NeXT: Use objc_msgSend_fpret for calling functions which returnDaniel Dunbar2008-10-171-14/+40
| | | | | | floating point. This is only correct for x86-32 at the moment. llvm-svn: 57667
* Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when ↵Ted Kremenek2008-10-061-1/+1
| | | | | | processing the Decl of a @catch statement. llvm-svn: 57208
* (LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.Daniel Dunbar2008-10-021-3/+3
| | | | llvm-svn: 56954
* NeXT: Update to use CreateRuntimeFunction for the routines it imports.Daniel Dunbar2008-10-011-80/+54
| | | | llvm-svn: 56902
* Add infrastructure for proper @finally support.Daniel Dunbar2008-09-301-55/+101
| | | | | | | | | | | | - Provides a basic primitive to jump to an arbitrary basic block, through the finally code. - Only used for return statements and rethrow currently. Still need to handle break, continue and goto. - Code still needs to be shuffled around to live elsewhere. llvm-svn: 56827
OpenPOWER on IntegriCloud