aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenObjC
AgeCommit message (Collapse)Author
2009-05-03Use the implementation decl for looking up offset while building theDaniel Dunbar
ivar layout. - The layout needs access to synthesized ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70798 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-03Rename test caseDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70797 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30API for message dispatch of methods returning floatsFariborz Jahanian
to match gcc's closely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30only support int128_t on 64-bit and larger targets. 32-bit targets don'tChris Lattner
have support for __divti3 and friends. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30initial support for __[u]int128_t, which should be basicallyChris Lattner
compatible with VC++ and GCC. The codegen/mangling angle hasn't been fully ironed out yet. Note that we accept int128_t even in 32-bit mode, unlike gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-29Export lazy references of .objc_class_name of class namesFariborz Jahanian
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
2009-04-27rdar://6827200 - [sema] reject statically allocated arrays of interface typesChris Lattner
Upgrade "array of interface" warning to an error. In addition to being a terrible idea, this crashes codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-25Fix pointer addressing and array subscripting of Objective-C interfaceDaniel Dunbar
types. - I broke this in the switch to representing interfaces with opaque types. - <rdar://problem/6822660> clang crashes on subscript of interface in 32-bit mode git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70009 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-24Add a test case for a somewhat obscure scenario.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69947 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-23Add implicit definition of objc_msgSend.Daniel Dunbar
- As with malloc and friends, this is important where the return type on a 64-bit platform would otherwise end up discarding the upper 32-bits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Reapply r69771, with updates & fixes:Daniel Dunbar
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
2009-04-22Make sure this test runs on all 3 Objective-C implementations.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69786 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Revert r69771, I missed some (obvious) details. :/Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69773 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22Rework the shadow struct that is layed out for Objective-C classes.Daniel Dunbar
- 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
2009-04-21Revert 69646, that was the precise inverse of what I wanted to commit.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69647 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Kill ASTContext::[gs]etFieldForDecl, instead we just lookup thingsDaniel Dunbar
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@69646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-21Fixup codegen for write barriers for block variables. Radar 6786715Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-20Set a bit in IMAGE_INFO to indicate that we don't contain anyDaniel Dunbar
@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
2009-04-20Don't emit ivar offsets for unnamed bit fields.Daniel Dunbar
Also, added assertion that the field matches what would be looked up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19Fix rdar://6804402 - crash on objc implementations declared withChris Lattner
@class but no implementation. This was broken in all 3 runtime impls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19Fix bug in computation of ivar offsets for (adjacent) bitfields.Daniel Dunbar
- The confusing IRgen bitfield interface is partly to blame here; fixing the functional error for now, cleanups to the interface to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18Test case would allow clang to fail.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18Fix test to output LLVM to a temporary file, which we grep as part of the testDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-18Use getAsPointerType instead of using getCanonicalType directly.Daniel Dunbar
- <rdar://problem/6803995> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69435 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17fix a crash compiling code with its own definition of objc_assign_weak.Chris Lattner
rdar://6800430 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,Chris Lattner
the functional change here is changing ConvertType -> ConvertTypeForMem so that we handle i1 fields properly as memory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-17clean up run lines.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16Category method synbols must be qualified by gategory name toFariborz Jahanian
match gcc's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69305 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-16Force target triple for test depending on __weak.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69297 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15Don't use \01 in symbol name if unnecessary.Daniel Dunbar
- This was particularly bad since I fixed one instance of this name and not another, meaning we got an LLVM module with the same effective name in two different globals! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69205 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15Fix alignment on obj_msgrefs to match llvm-gcc.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15Add test case for superrefs section (and make spacing consistent).Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.Daniel Dunbar
- Set alignment on property lists. - 32-bit: o Set section on property lists. o Fix section name for category class methods. o Fix symbol name for property lists. o Fix section name for class method. o Set alignment and section on class extension structure. o Set alignment on a number of things: instance variables, methods, method descriptions, the symbols structure. - 64-bit: o Fix section flags for protocol list. I doubt most of these were problems in practice, but it is nice to match llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14Set alignment on __cstring metadata variables to 1 (matchingDaniel Dunbar
llvm-gcc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-14Fixup CodeGen for __weak __block variables. Radar 6756266Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12OS dependent code removed.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68904 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-11Non-pointer objects are none gc'able regardles ofFariborz Jahanian
the attribute set on them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68844 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10Fixup copy/dispose helpers for Objective-C. Radar 6756504Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68837 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10Force triple for a number of tests that rely on __weak.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68826 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10Patch to generate meta-data for prtocol usedFariborz Jahanian
in @protocol expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68806 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-09Add @encode support for complex types.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-08Implementation definition of interfaces with __objc_exception attribute.Daniel Dunbar
- Complete <rdar://problem/6635883> Support __objc_exception__ attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07Propagte -fvisibility to objc2's class symbols.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07Handle use side of __objc_exception__ attribute; when using anDaniel Dunbar
exception with this attribute we don't need to emit a weak definition for the exception type information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07*everyone* knows that __weak is not defined on linux :)Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07Various fixes to symbols used for Obj-C x86_64 metadata.Daniel Dunbar
- Changed method names to match gcc (categories names still aren't mangled in). - Expose correct name for class and metadata symbols (although -fvisibility=hidden isn't yet correct). - Remove several things from llvm.used that didn't need to be there (I suspect this can still be trimmed). - Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not needed). - Hide EH type class info with -fvisibility=hidden - Change setGlobal[Option]Visibility to not change the visibility of functions with internal linkage. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07Fix test (triple wasn't passed correctly, the driver doesn't acceptDaniel Dunbar
-mtriple). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06Fixed visibility issues related to objc2's synthesizedFariborz Jahanian
ivars. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06Fix a couple of cases where Constant* pointers can dangle inChris Lattner
ObjCNonFragileABITypesHelper by converting them to dynamic getters. This fixes a crash on rdar://6757213. The others should be converted over as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01Fix a bug in declaration of property in continuationFariborz Jahanian
class which was exposed by implementation of objc2's nonfragile abi code gen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68259 91177308-0d34-0410-b5e6-96231b3b80d8