summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
Commit message (Collapse)AuthorAge
...
* It turns out BuildAggrIvarLayout wasn't even using the shadow struct,Daniel Dunbar2009-05-03
| | | | | | | just computing it! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70779 91177308-0d34-0410-b5e6-96231b3b80d8
* Lift common subexpression, remove dead "base" variable.Daniel Dunbar2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70778 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out BuildAggrIvarRecordLayout routine.Daniel Dunbar2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70777 91177308-0d34-0410-b5e6-96231b3b80d8
* Lift out GetGCAttrTypeForType routine.Daniel Dunbar2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70776 91177308-0d34-0410-b5e6-96231b3b80d8
* Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.Daniel Dunbar2009-05-03
| | | | | | | Lift up a size calculation and note some asymmetries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70775 91177308-0d34-0410-b5e6-96231b3b80d8
* Normalize style, remove a dead assert.Daniel Dunbar2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70771 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ASTRecordLayout for computing ivar offsets instead of shadowDaniel Dunbar2009-05-03
| | | | | | | | | | | | struct. - We still need to do more lookup than necessary because ivars don't live in a reasonable DeclContext. - The only remaining client of the interface shadow struct is the ivar layout bitmap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70756 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a ComputeIvarBaseOffset overload taking an implementationDaniel Dunbar2009-05-03
| | | | | | | | | decl. Only this routine will be suitable for computing the offset of a synthesized ivar. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70696 91177308-0d34-0410-b5e6-96231b3b80d8
* Compute Objective-C metadata size information from the record layout,Daniel Dunbar2009-05-03
| | | | | | | not the shadow structure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70691 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused argument.Daniel Dunbar2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70684 91177308-0d34-0410-b5e6-96231b3b80d8
* Coalesce the ivar offset calculation further.Daniel Dunbar2009-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70683 91177308-0d34-0410-b5e6-96231b3b80d8
* Use type from ivar instead of from shadow struct field.Daniel Dunbar2009-05-03
| | | | | | | - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70674 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a warning when this file is compiled optimized.Fariborz Jahanian2009-04-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70518 91177308-0d34-0410-b5e6-96231b3b80d8
* API for message dispatch of methods returning floatsFariborz Jahanian2009-04-30
| | | | | | | to match gcc's closely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70493 91177308-0d34-0410-b5e6-96231b3b80d8
* Undid setting of the flag for msg_Send for 32bit code gen.Fariborz Jahanian2009-04-29
| | | | | | | It seems to effect code gen. Add a FIXME instead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70423 91177308-0d34-0410-b5e6-96231b3b80d8
* Export lazy references of .objc_class_name of class namesFariborz Jahanian2009-04-29
| | | | | | | | referenced in a category implementation meta-data (Next objc 32bit abi). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70407 91177308-0d34-0410-b5e6-96231b3b80d8
* Type of msgSend message dispatch API is a vararg.Fariborz Jahanian2009-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70404 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.Eli Friedman2009-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
* split ObjC and C++ Statements out into their own headers.Chris Lattner2009-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor refactoring. No intended change in behavior.Fariborz Jahanian2009-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69988 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor refactoring. No change in functionality.Fariborz Jahanian2009-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69979 91177308-0d34-0410-b5e6-96231b3b80d8
* Some code clean up of objc2's bitmap layout.Fariborz Jahanian2009-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69970 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed bunch of FIXMEs no longer needed.Fariborz Jahanian2009-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69896 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark IMAGE_INFO as constant on x86_64-darwin.Daniel Dunbar2009-04-23
| | | | | | | | - This shouldn't change anything, we never actually access it, but this is consistent with llvm-gcc (and 32-bit) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69880 91177308-0d34-0410-b5e6-96231b3b80d8
* Use std::sort instead of qsort.Daniel Dunbar2009-04-23
| | | | | | | | | | - Notably, there was a memory error here, SkipIvars does not have to be the same size as IvarsInfo. - Fariborz, please check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69850 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-23
| | | | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
* ivar layout bitmap is alive!Fariborz Jahanian2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69838 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r69771, with updates & fixes:Daniel Dunbar2009-04-22
| | | | | | | | | | | | | | | | | | | | | | | Rework the shadow struct that is layed out for Objective-C classes. - Superclasses are now always laid out in their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields were incorrect (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal (for example, ivar are looked up recursively, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69811 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.Daniel Dunbar2009-04-22
| | | | | | | | - This is only used by CGObjCRuntime now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69800 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't convert interface types (to structs) as part of CodeGenTypes.Daniel Dunbar2009-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This has pros and cons, but for now the pros seem to significantly outway the con. The con is that we will always need to cast in the runtime implementation to a struct type, if we wish to access an interface directly. The pros are: - Avoid the cost of generating types which are used. Most manipulation of Objective-C objects is done through messages, and only the implementation of a class will directly access memory. Previously, we would convert the type even if it only appear as a function parameter, for example. - We don't need to worry about incomplete types, and UpdateCompletedType for interfaces is gone. - It becomes easier to narrow the interface to the shadow struct for Objective-C interfaces (so it can be eliminated). Currently the runtimes still use the CodeGenTypes machinery to generate the LLVM structure they need via ConvertTagDecl, but this can eventually be replaced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69797 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to theDaniel Dunbar2009-04-22
| | | | | | | underlying llvm::StructType for an interface. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69796 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit meta data using the Ivar, not a looked up FieldDecl.Daniel Dunbar2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69790 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge ivar access amongst the three runtimes.Daniel Dunbar2009-04-22
| | | | | | | | | | - For now, this means we are always doing the address computations by hand instead of constructing a proper GEP. Right now, however, this is less important than having fewer entry points to dealing with Objective-C interface layout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69787 91177308-0d34-0410-b5e6-96231b3b80d8
* Make ObjCInterfaceDecl's const in some more places.Daniel Dunbar2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69775 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r69771, I missed some (obvious) details. :/Daniel Dunbar2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69773 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the shadow struct that is layed out for Objective-C classes.Daniel Dunbar2009-04-22
| | | | | | | | | | | | | | | | | | | | - Superclasses are now always laid out their shadow structure at the first field. - Prior to this, the entire class heirarchy was flattened into a single structure which meant that alignment, padding, and bitfields weren't packed correctly (the ASTRecordLayout was correct however, which meant our debug info didn't coincide with ivar offsets, for example). - This is still very suboptimal, but I believe the ivar layout itself is now at least close to correct. - <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding backwards git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69771 91177308-0d34-0410-b5e6-96231b3b80d8
* move 64-bit abi functions to lazy model, everything is lazy now, yay.Chris Lattner2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69767 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the last of the non-lazy objc runtime functions for the 32-bit ABI,Chris Lattner2009-04-22
| | | | | | | 7 left for 64-bit ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69766 91177308-0d34-0410-b5e6-96231b3b80d8
* number of non-lazy runtime functions from 9 -> 4.Chris Lattner2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69765 91177308-0d34-0410-b5e6-96231b3b80d8
* make message send functions lazy, we're down from 14 non-lazy functions to 9.Chris Lattner2009-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69764 91177308-0d34-0410-b5e6-96231b3b80d8
* move more EH stuff to being lazily created. An empty .m file now Chris Lattner2009-04-22
| | | | | | | produces just 14 dead "declares" in llvm ir instead of 19. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69763 91177308-0d34-0410-b5e6-96231b3b80d8
* make try/catch objc runtime functions be lazily generated.Chris Lattner2009-04-22
| | | | | | | | rdar://6809612 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69762 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to mark the interface as completed when we see anDaniel Dunbar2009-04-21
| | | | | | | | | | @implementation that closes a @class delcaration. - I don't know how to make a test case for this, but this strengthens the invariants that hold internally. The functionality change here is the edit to SemaDeclObjC.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
* More objc2's ivar layout bitmap. No change in functionality.Fariborz Jahanian2009-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69695 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ASTContext::[gs]etFieldForDecl, instead we just lookup thingsDaniel Dunbar2009-04-21
| | | | | | | | | when we need them -- which is exactly what some code was already doing! - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
* Assert on a few conditions that (I believe) should holdDaniel Dunbar2009-04-21
| | | | | | | | w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to EmitObjCValueForIvar). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69639 91177308-0d34-0410-b5e6-96231b3b80d8
* ObjC2's Ivar bitmap layout work. No change in functionality.Fariborz Jahanian2009-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69629 91177308-0d34-0410-b5e6-96231b3b80d8
* Move countInheritedIvars to within striking distance ofDaniel Dunbar2009-04-20
| | | | | | | | | | | | | GetClassSizeInfo Reduce nesting in GetInterfaceDeclStructLayout. Tweak some comments. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69621 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline GetFirstIvarInRecord into sole caller.Daniel Dunbar2009-04-20
| | | | | | | - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69582 91177308-0d34-0410-b5e6-96231b3b80d8
* Set a bit in IMAGE_INFO to indicate that we don't contain anyDaniel Dunbar2009-04-20
| | | | | | | | | @synthesized ivars for superclasses. - <rdar://problem/6806371> [clang] Mark code without miscompiled @synthesized properties git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69581 91177308-0d34-0410-b5e6-96231b3b80d8