Commit Graph

652 Commits

Author SHA1 Message Date
Fariborz Jahanian 0e3043b2ed block extended signatur option. Change previous option
to a cc1 -fencode-extended-block-signature and pass it
to cc1 and recognize this option to produce extended block
type signature. // rdar://12109031 

llvm-svn: 168063
2012-11-15 19:02:45 +00:00
Fariborz Jahanian a4ca19694e objective-C blocks: make cc1 flag -encode-extended-block-signature
the default. // rdar://12109031

llvm-svn: 168007
2012-11-15 00:01:28 +00:00
Fariborz Jahanian 64223e6db1 objective-C blocks: under cc1 flag -encode-extended-block-signature,
generate expanded signature encoding to include types as we
already do this for protocol method lists.
// rdar://12109031

llvm-svn: 167997
2012-11-14 23:11:38 +00:00
Fariborz Jahanian a9d4464baf objective-C blocks: Provide layout map for byref
variables captured in a block. // rdar://12184410

llvm-svn: 167931
2012-11-14 17:15:51 +00:00
Fariborz Jahanian e14f98e0bc objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.
lower 24bit is currently being used.

llvm-svn: 167678
2012-11-10 18:30:40 +00:00
David Chisnall 9a837be2b9 Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note that
a bug in the inliner still causes the wrong thing to happen at -O2 and above
(PR14116).

llvm-svn: 167534
2012-11-07 16:50:40 +00:00
Eli Friedman 8593748ed5 Put something sane in the DWARF offset field for bitfield ObjC ivars.
This is useful because unnamed bitfields can have effects on the
offsets which are not otherwise reflected in the DWARF information.

<rdar://problem/12629719>

llvm-svn: 167503
2012-11-06 23:40:48 +00:00
Eli Friedman 1e83d6f612 Fix a silly mistake in r167437.
llvm-svn: 167487
2012-11-06 21:10:22 +00:00
Eli Friedman b201e4d6ab Minor fix to ObjC layout bitmap metadata. Found while I was trying to
refactor the code.

llvm-svn: 167436
2012-11-06 03:38:02 +00:00
Fariborz Jahanian 5f04d84459 Tests for 32bit version of block ivar layout metadata.
llvm-svn: 167387
2012-11-05 18:14:34 +00:00
Fariborz Jahanian 2c96d30dd8 Fixes liftime of captured block variables in mrr mode, per John's feedback, as
well as couple of tests which were not being excercised because of TYPOs.

llvm-svn: 167374
2012-11-04 18:19:40 +00:00
David Blaikie c59571878c Simplify these tests again, now that we're past the version skew.
llvm-svn: 167346
2012-11-03 00:27:14 +00:00
David Blaikie 263f6a0ffa Avoid version skew by making ObjC strict metadata tests resilient to new field.
llvm-svn: 167332
2012-11-02 23:07:41 +00:00
Fariborz Jahanian 2dd7819267 objective-C mrr block. Block variable layout metadata in
mrr mode.

llvm-svn: 167331
2012-11-02 22:51:18 +00:00
Quentin Colombet 4e172067b2 Update the front end to use minsize attribute
llvm-svn: 167266
2012-11-01 23:55:47 +00:00
Fariborz Jahanian 23290b0570 objective-C block meta-data. This patch completes meta-data
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://12184410.

llvm-svn: 167241
2012-11-01 18:32:55 +00:00
Eli Friedman 0e84602d5c Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/12547611>.
llvm-svn: 166825
2012-10-26 22:38:05 +00:00
David Tweed d8bb236e18 Correct test inovocations to use %clang_cc1 rather than direct invocation (so that it can have additional options set when trying to debug issues causing regressions).
llvm-svn: 166681
2012-10-25 13:56:30 +00:00
Ulrich Weigand 35668cc401 A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type.  This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.

This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.

llvm-svn: 166551
2012-10-24 12:22:56 +00:00
NAKAMURA Takumi f1f6e99c53 Revert r166541, "clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532."
According to r166543, it is not needed for now.

llvm-svn: 166544
2012-10-24 03:59:09 +00:00
NAKAMURA Takumi a22fe582d2 clang/test: Add appropriate requirements as REQUIRES, corresponding to r166532.
llvm-svn: 166541
2012-10-24 02:57:57 +00:00
John McCall 0d54a17b52 Set a special flag in class metadata when an Objective-C class
has ivars that require destruction, but none that require anything
except zero-initialization.  This is common in ARC and (when true
throughout a class hierarchy) permits the elimination of an
unnecessary message-send during allocation.

llvm-svn: 166088
2012-10-17 04:53:31 +00:00
John McCall e68b8f4dcc At -O0, prefer objc_storeStrong with a null new value to the
combination of a load+objc_release;  this is generally better
for tools that try to track why values are retained and
released.  Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.

llvm-svn: 166085
2012-10-17 02:28:37 +00:00
David Chisnall a5f5941374 GNUstep runtime version default to 1.6, generate correct property attribute
metadata.

llvm-svn: 166023
2012-10-16 15:11:55 +00:00
Daniel Dunbar bd847cc562 Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
llvm-svn: 165988
2012-10-15 22:23:53 +00:00
Nico Weber bec2bf1326 Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
See PR14013.

llvm-svn: 165962
2012-10-15 20:37:01 +00:00
Fariborz Jahanian 27678b0961 objective-C IRgen: When sending a method to 'super'
in a category class method, don't read 'isa' pointer. Instead,
save the desired OBJC_METACLASS_$_ClassName in 
__DATA,__objc_superrefs and read that without reading any 
isa pointers. // rdar://12459358

llvm-svn: 165674
2012-10-10 23:11:18 +00:00
Eli Friedman 9018ef709e Make sure to generate the right kind of MDNode for enum forward declarations.
PR14029, clang part.

llvm-svn: 165289
2012-10-05 01:49:33 +00:00
Chandler Carruth 01f63b950c Re-enable this test to reflect re-enabling the new SROA pass.
llvm-svn: 164987
2012-10-02 04:24:16 +00:00
Bob Wilson 2afa011e0b Add Clang support for iOS6.
llvm-svn: 164907
2012-09-29 23:52:58 +00:00
Nick Lewycky 2099bbb24b Turn off this test, as the new and old SROA cause it produce different output.
Left in a note that we need to turn it back on once the SROA fallout is cleared
up.

llvm-svn: 164733
2012-09-26 22:48:46 +00:00
John McCall b0433eeb2e During jump-scope checking, build an ExprWithCleanups immediately
into the enclosing scope;  this is a more accurate model but is
(I believe) unnecessary in my test case due to other flaws.
However, one of those flaws is now intentional:  blocks which
appear in return statements can be trivially observed to not
extend in lifetime past the return, and so we can allow a jump
past them.  Do the necessary magic in IR-generation to make
this work.

llvm-svn: 164589
2012-09-25 06:56:03 +00:00
Chandler Carruth ed2a284977 Update the Clang tests which run with a full optimization pipeline for
the new SROA pass. This is a benign change: the order of PHI nodes
changed.

llvm-svn: 164481
2012-09-24 01:10:25 +00:00
Benjamin Kramer a73727143a Disable some tests that fail when the x86 backend isn't built.
llvm-svn: 164122
2012-09-18 13:34:01 +00:00
Eric Christopher 31ce693f93 Reapply:
Make clang emit a flag for DW_AT_object_pointer for the artificial
    args where it should (implicit first arguments). FileCheck-ize a
    test as well and update tests to take into account the object
    pointer flag.

    rdar://9797999

llvm-svn: 163755
2012-09-12 23:36:49 +00:00
Eric Christopher 48f782bbd2 Revert "Make clang emit a flag for DW_AT_object_pointer for the artificial"
this should be done on the subprogram, not the variable.

llvm-svn: 163733
2012-09-12 18:42:10 +00:00
NAKAMURA Takumi cb0a08ac77 clang/test: [PR13820] Suppress LLP64-incompatible tests for ObjC with +Asserts.
llvm-svn: 163709
2012-09-12 14:26:42 +00:00
NAKAMURA Takumi f331aa9c00 clang/test/CodeGenObjC: [PR13820] Suppress LLP64-incompatible tests.
llvm-svn: 163701
2012-09-12 10:45:52 +00:00
NAKAMURA Takumi fcd16e36c8 clang/test: [PR8833] Introduce the feature "LP64" to suppress LLP64-incompatible tests.
I think some of them could be rewritten to fit also LLP64.

llvm-svn: 163699
2012-09-12 10:45:40 +00:00
Eric Christopher 1d292e59d3 Make clang emit a flag for DW_AT_object_pointer for the artificial
args where it should (implicit first arguments). FileCheck-ize a
test as well and update tests to take into account the object
pointer flag.

rdar://9797999

llvm-svn: 163668
2012-09-12 00:27:32 +00:00
John McCall cfa4e9bdf3 In ARC, if we're emitting assembly markers for calls to
objc_retainAutoreleasedReturnValue, we need to also be killing
them during return peepholing.  Make sure we recognize an
intervening bitcast, but more importantly, assert if we can't
find the asm marker at all.  rdar://problem/12133032

llvm-svn: 163431
2012-09-07 23:30:50 +00:00
Aaron Ballman 9c00446d2a Fixing the return type information for objc_sync_enter and objc_sync_exit. Patch thanks to Joe Ranieri!
llvm-svn: 163330
2012-09-06 16:44:16 +00:00
Eli Friedman 8087378f09 Fix PR reference in test.
llvm-svn: 162866
2012-08-29 21:27:50 +00:00
Eli Friedman 9a38121fc5 Fix run-line for test.
llvm-svn: 162865
2012-08-29 21:25:58 +00:00
Eli Friedman 504f9a2872 Make alignment computation for pointer values for builtins handle
non-pointer types with a pointer representation correctly. PR13660.

llvm-svn: 162862
2012-08-29 21:21:11 +00:00
John McCall 986a992400 Restore a -cc1 invariant that was causing problems on PPC64.
This test case is pretty bad, though.

llvm-svn: 162694
2012-08-27 19:56:37 +00:00
John McCall d8561f058d Fix a pair of bugs relating to properties in ARC.
First, when synthesizing an explicitly strong/retain/copy property
of Class type, don't pretend during compatibility checking that the
property is actually assign.  Instead, resolve incompatibilities
by secretly changing the type of *implicitly* __unsafe_unretained
Class ivars to be strong.  This is moderately evil but better than
what we were doing.

Second, when synthesizing the setter for a strong property of
non-retainable type, be sure to use objc_setProperty.  This is
possible when the property is decorated with the NSObject
attribute.  This is an ugly, ugly corner of the language, and
we probably ought to deprecate it.

The first is rdar://problem/12039404;  the second was noticed by
inspection while fixing the first.

llvm-svn: 162244
2012-08-20 23:36:59 +00:00
Benjamin Kramer e0b3f44ffc Fix broken check lines.
llvm-svn: 162096
2012-08-17 12:28:21 +00:00
Fariborz Jahanian af264ce12a objc-arc: set nonlazybind attribute on objc_retain/
objc_release for performance for these most often
called APIs. // rdar://12040837

llvm-svn: 161448
2012-08-07 21:30:31 +00:00
Eric Christopher ec21f68740 Don't need to specify the abi as it's the default.
rdar://11842763

llvm-svn: 160554
2012-07-20 17:42:31 +00:00