r339438 - [CodeGen] Merge equivalent block copy/helper functions.

2018-08-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Aug 10 08:09:24 2018 New Revision: 339438 URL: http://llvm.org/viewvc/llvm-project?rev=339438&view=rev Log: [CodeGen] Merge equivalent block copy/helper functions. Clang generates copy and dispose helper functions for each block literal on the stack. Often these functio

r339452 - Make changes to the check strings so that the test I modified in r339438

2018-08-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Aug 10 10:07:27 2018 New Revision: 339452 URL: http://llvm.org/viewvc/llvm-project?rev=339452&view=rev Log: Make changes to the check strings so that the test I modified in r339438 passes on 32-bit targets. Modified: cfe/trunk/test/CodeGenCXX/block-byref-cxx-objc.cp

r339613 - Convert if/else to a switch. NFC.

2018-08-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Aug 13 13:59:57 2018 New Revision: 339613 URL: http://llvm.org/viewvc/llvm-project?rev=339613&view=rev Log: Convert if/else to a switch. NFC. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp URL: http://llvm.org/viewvc/llvm

r339632 - Fix check strings in test/CodeGenObjC/arc-blocks.m in preperation for

2018-08-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Aug 13 17:15:41 2018 New Revision: 339632 URL: http://llvm.org/viewvc/llvm-project?rev=339632&view=rev Log: Fix check strings in test/CodeGenObjC/arc-blocks.m in preperation for fixing a bug introduced in r339438. Check the descriptor global variables in the IR at both

r339633 - [CodeGen] Before returning a copy/dispose helper function, bitcast it to

2018-08-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Aug 13 17:15:42 2018 New Revision: 339633 URL: http://llvm.org/viewvc/llvm-project?rev=339633&view=rev Log: [CodeGen] Before returning a copy/dispose helper function, bitcast it to a void pointer type. This fixes a bug introduced in r339438. Modified: cfe/trunk/lib

r340041 - [CodeGen] Merge identical block descriptor global variables.

2018-08-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Aug 17 08:46:07 2018 New Revision: 340041 URL: http://llvm.org/viewvc/llvm-project?rev=340041&view=rev Log: [CodeGen] Merge identical block descriptor global variables. Currently, clang generates a new block descriptor global variable for each new block literal. This co

r340408 - [CodeGen] Look at the type of a block capture field rather than the type

2018-08-22 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Aug 22 06:41:19 2018 New Revision: 340408 URL: http://llvm.org/viewvc/llvm-project?rev=340408&view=rev Log: [CodeGen] Look at the type of a block capture field rather than the type of the captured variable when determining whether the capture needs special handing when t

r332397 - Address post-commit review comments after r328731. NFC.

2018-05-15 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue May 15 14:00:30 2018 New Revision: 332397 URL: http://llvm.org/viewvc/llvm-project?rev=332397&view=rev Log: Address post-commit review comments after r328731. NFC. - Define a function (canPassInRegisters) that determines whether a record can be passed in registers based

[libcxx] r333103 - Teach __libcpp_is_floating_point that __fp16 and _Float16 are

2018-05-23 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed May 23 10:31:09 2018 New Revision: 333103 URL: http://llvm.org/viewvc/llvm-project?rev=333103&view=rev Log: Teach __libcpp_is_floating_point that __fp16 and _Float16 are floating-point types. rdar://problem/40377353 Added: libcxx/trunk/test/libcxx/type_traits/is_fl

[libcxx] r333108 - Do not define template specialization __libcpp_is_floating_point<__fp16>

2018-05-23 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed May 23 10:50:41 2018 New Revision: 333108 URL: http://llvm.org/viewvc/llvm-project?rev=333108&view=rev Log: Do not define template specialization __libcpp_is_floating_point<__fp16> if the compiler is not clang. gcc doesn't allow using __fp16 on non-ARM targets. Modifie

r333447 - [CodeGen][Darwin] Set the calling-convention of thread-local variable

2018-05-29 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue May 29 11:28:49 2018 New Revision: 333447 URL: http://llvm.org/viewvc/llvm-project?rev=333447&view=rev Log: [CodeGen][Darwin] Set the calling-convention of thread-local variable initialization functions to 'cxx_fast_tlscc'. This fixes a bug where instructions calling in

r314370 - Look through parentheses.

2017-09-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Sep 27 18:31:17 2017 New Revision: 314370 URL: http://llvm.org/viewvc/llvm-project?rev=314370&view=rev Log: Look through parentheses. This fixes a bug where clang would emit instructions to reclaim a value that's going to be __bridge-casted to CF. rdar://problem/346875

r315045 - [CodeGen] Emit a helper function for __builtin_os_log_format to reduce

2017-10-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 6 00:12:46 2017 New Revision: 315045 URL: http://llvm.org/viewvc/llvm-project?rev=315045&view=rev Log: [CodeGen] Emit a helper function for __builtin_os_log_format to reduce code size. Currently clang expands a call to __builtin_os_log_format into a long sequence o

r315046 - Fix check strings in test case and use llvm::to_string instead of

2017-10-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 6 00:47:47 2017 New Revision: 315046 URL: http://llvm.org/viewvc/llvm-project?rev=315046&view=rev Log: Fix check strings in test case and use llvm::to_string instead of std::to_string. These changes were needed to fix bots that started failing after r315045. Modif

r315047 - Fix one more check string after r315045.

2017-10-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 6 01:05:34 2017 New Revision: 315047 URL: http://llvm.org/viewvc/llvm-project?rev=315047&view=rev Log: Fix one more check string after r315045. Modified: cfe/trunk/test/CodeGenObjC/os_log.m Modified: cfe/trunk/test/CodeGenObjC/os_log.m URL: http://llvm.org/vi

r315049 - Fix one more check string after r315045.

2017-10-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 6 01:19:31 2017 New Revision: 315049 URL: http://llvm.org/viewvc/llvm-project?rev=315049&view=rev Log: Fix one more check string after r315045. Modified: cfe/trunk/test/CodeGenObjC/os_log.m Modified: cfe/trunk/test/CodeGenObjC/os_log.m URL: http://llvm.org/vi

r315261 - [Sema][ObjC] Preserve syntactic sugar when removing

2017-10-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 9 18:24:33 2017 New Revision: 315261 URL: http://llvm.org/viewvc/llvm-project?rev=315261&view=rev Log: [Sema][ObjC] Preserve syntactic sugar when removing ARCReclaimReturnedObject cast. This is a follow-up to r314370. Rather than throwing away the enclosing parent

r315639 - [Sema][ObjC] Complete merging ObjC methods before checking their

2017-10-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Oct 12 16:24:38 2017 New Revision: 315639 URL: http://llvm.org/viewvc/llvm-project?rev=315639&view=rev Log: [Sema][ObjC] Complete merging ObjC methods before checking their overriding methods. This should fix test case Analysis/retain-release.m that was failing on the r

r316531 - [Sema][ObjC] Look for either objc_bridge or objc_bridge_mutable when

2017-10-24 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Oct 24 16:38:14 2017 New Revision: 316531 URL: http://llvm.org/viewvc/llvm-project?rev=316531&view=rev Log: [Sema][ObjC] Look for either objc_bridge or objc_bridge_mutable when determining whether a RecordDecl is CFError. CFErrorRef used to be declared with "objc_bridge

r340854 - Define variables in test case rather than using values from functions

2018-08-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Aug 28 11:18:01 2018 New Revision: 340854 URL: http://llvm.org/viewvc/llvm-project?rev=340854&view=rev Log: Define variables in test case rather than using values from functions emitted ealier. Modified: cfe/trunk/test/CodeGenObjCXX/arc-blocks.mm Modified: cfe/trun

r341629 - [Sema] Check that the destructor for each element of class type is

2018-09-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Sep 6 19:38:01 2018 New Revision: 341629 URL: http://llvm.org/viewvc/llvm-project?rev=341629&view=rev Log: [Sema] Check that the destructor for each element of class type is accessible from the context where aggregate initialization occurs. rdar://problem/38168772 Dif

r341754 - Distinguish `__block` variables that are captured by escaping blocks

2018-09-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Sep 8 13:03:00 2018 New Revision: 341754 URL: http://llvm.org/viewvc/llvm-project?rev=341754&view=rev Log: Distinguish `__block` variables that are captured by escaping blocks from those that aren't. This patch changes the way __block variables that aren't captured by

r341757 - Revert r341754.

2018-09-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Sep 8 22:22:49 2018 New Revision: 341757 URL: http://llvm.org/viewvc/llvm-project?rev=341757&view=rev Log: Revert r341754. The commit broke a couple of bots: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/12347 http://lab.llvm.org:8011

r337580 - [CodeGen][ObjC] Make copying and disposing of a non-escaping block

2018-07-20 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jul 20 10:10:32 2018 New Revision: 337580 URL: http://llvm.org/viewvc/llvm-project?rev=337580&view=rev Log: [CodeGen][ObjC] Make copying and disposing of a non-escaping block no-ops. A non-escaping block on the stack will never be called after its lifetime ends, so it d

r338041 - [CodeGen][ObjC] Make block copy/dispose helper functions exception-safe.

2018-07-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 26 09:51:21 2018 New Revision: 338041 URL: http://llvm.org/viewvc/llvm-project?rev=338041&view=rev Log: [CodeGen][ObjC] Make block copy/dispose helper functions exception-safe. When an exception is thrown in a block copy helper function, captured objects that have p

r338048 - [Sema][ObjC] Do not propagate the nullability specifier on the receiver

2018-07-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jul 26 10:51:13 2018 New Revision: 338048 URL: http://llvm.org/viewvc/llvm-project?rev=338048&view=rev Log: [Sema][ObjC] Do not propagate the nullability specifier on the receiver to the result type of a message send if the result type cannot have a nullability specifier

r338189 - [Sema][ObjC] Warn when a method declared in a protocol takes a

2018-07-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Jul 27 21:06:13 2018 New Revision: 338189 URL: http://llvm.org/viewvc/llvm-project?rev=338189&view=rev Log: [Sema][ObjC] Warn when a method declared in a protocol takes a non-escaping parameter but the implementation's method takes an escaping parameter. rdar://problem/

r338656 - Serialize DoesNotEscape.

2018-08-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Aug 1 16:51:53 2018 New Revision: 338656 URL: http://llvm.org/viewvc/llvm-project?rev=338656&view=rev Log: Serialize DoesNotEscape. I forgot to commit this in r326530. Added: cfe/trunk/test/PCH/no-escaping-block-tail-calls.cpp cfe/trunk/test/PCH/no-escaping-bl

r338664 - Pass triple to RUN line to fix failing bots.

2018-08-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Aug 1 18:52:17 2018 New Revision: 338664 URL: http://llvm.org/viewvc/llvm-project?rev=338664&view=rev Log: Pass triple to RUN line to fix failing bots. This is a follow-up to r338656. Modified: cfe/trunk/test/PCH/no-escaping-block-tail-calls.cpp Modified: cfe/tru

r324269 - Add support for attribute 'trivial_abi'.

2018-02-05 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Feb 5 12:23:22 2018 New Revision: 324269 URL: http://llvm.org/viewvc/llvm-project?rev=324269&view=rev Log: Add support for attribute 'trivial_abi'. The 'trivial_abi' attribute can be applied to a C++ class, struct, or union. It makes special functions of the annotated

r324425 - [Sema][ObjC] Use SmallSetVector to fix a failing test on the reverse

2018-02-06 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Feb 6 15:44:40 2018 New Revision: 324425 URL: http://llvm.org/viewvc/llvm-project?rev=324425&view=rev Log: [Sema][ObjC] Use SmallSetVector to fix a failing test on the reverse iteration bot. This commit reverts r315639, which was causing clang to print diagnostics that

r324765 - Remove "CHECK: entry" in test case.

2018-02-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Feb 9 11:25:31 2018 New Revision: 324765 URL: http://llvm.org/viewvc/llvm-project?rev=324765&view=rev Log: Remove "CHECK: entry" in test case. rdar://problem/37397814 Modified: cfe/trunk/test/CodeGenObjCXX/trivial_abi.mm Modified: cfe/trunk/test/CodeGenObjCXX/tri

r325321 - [Sema] Take into account the current context when checking the

2018-02-16 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Feb 16 00:47:37 2018 New Revision: 325321 URL: http://llvm.org/viewvc/llvm-project?rev=325321&view=rev Log: [Sema] Take into account the current context when checking the accessibility of a class member. This fixes PR32898. rdar://problem/33737747 Differential revisio

Re: r325321 - [Sema] Take into account the current context when checking the

2018-02-16 Thread Akira Hatanaka via cfe-commits
Chromium build. > > See https://bugs.chromium.org/p/chromium/issues/detail?id=813017 for > stack trace and reproducer. > > (I think Ben said it might have also broken a Clang bootstrap build, > but I didn't see that anywhere?) > > On Fri, Feb 16, 2018 at 9:47 AM, A

r304449 - [CodeGen][ObjC] Fix assertion failure in EmitARCStoreStrongCall.

2017-06-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jun 1 13:41:25 2017 New Revision: 304449 URL: http://llvm.org/viewvc/llvm-project?rev=304449&view=rev Log: [CodeGen][ObjC] Fix assertion failure in EmitARCStoreStrongCall. The assertion fails because EmitValueForIvarAtOffset doesn't get the correct type of the ivar whe

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-01 Thread Akira Hatanaka via cfe-commits
11:33 AM, Joerg Sonnenberger wrote: > > On Tue, Mar 14, 2017 at 04:00:53AM -, Akira Hatanaka via cfe-commits > wrote: >> Author: ahatanak >> Date: Mon Mar 13 23:00:52 2017 >> New Revision: 297702 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=29770

r304507 - [Sema] Improve -Wstrict-prototypes diagnostic message for blocks.

2017-06-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jun 1 20:07:08 2017 New Revision: 304507 URL: http://llvm.org/viewvc/llvm-project?rev=304507&view=rev Log: [Sema] Improve -Wstrict-prototypes diagnostic message for blocks. Print "this block declaration is not a prototype" for non-prototype declarations of blocks inste

r305772 - Add a subgroup of c++1z-compat to enable and disable the warning about

2017-06-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jun 20 01:18:46 2017 New Revision: 305772 URL: http://llvm.org/viewvc/llvm-project?rev=305772&view=rev Log: Add a subgroup of c++1z-compat to enable and disable the warning about c++17's non-throwing exception specification in function signature. rdar://problem/32628743

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-22 Thread Akira Hatanaka via cfe-commits
Do you want the same encoding for the bitfield “int : 1” you saw before r297792, which is just “i"? The encoding for bitfield is normally bN where N is the number of bits, but the comment in function EncodeBitField says GNU runtime encodes it differently. > On Jun 22, 2017, at 8:30 AM, Joerg So

Re: r297702 - [CodeGen][ObjC] Fix a bug where the type of an ivar wasn't encoded

2017-06-22 Thread Akira Hatanaka via cfe-commits
According to the documentation, the starting position of the field has to be encoded too: https://gcc.gnu.org/onlinedocs/gcc/Type-encoding.html I’m not sure whether we need the same information for bitfield ivars though. > On Jun 22, 2017

[libcxx] r306310 - [libcxx] Annotate c++17 aligned new/delete operators with availability

2017-06-26 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jun 26 10:39:48 2017 New Revision: 306310 URL: http://llvm.org/viewvc/llvm-project?rev=306310&view=rev Log: [libcxx] Annotate c++17 aligned new/delete operators with availability attribute. This is needed because older versions of libc++ do not have these operators. If

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2017-12-19 Thread Akira Hatanaka via cfe-commits
On Tue, Dec 12, 2017 at 12:12 PM, John McCall wrote: > On Tue, Dec 12, 2017 at 1:45 PM, David Blaikie wrote: > >> On Mon, Dec 11, 2017 at 5:38 PM John McCall wrote: >> >>> On Mon, Dec 11, 2017 at 6:19 PM, David Blaikie >>> wrote: >>> On Mon, Dec 11, 2017 at 3:16 PM John McCall via Phabric

Re: trivial_abi

2018-01-02 Thread Akira Hatanaka via cfe-commits
> On Jan 2, 2018, at 4:56 PM, Richard Smith via cfe-commits > wrote: > > On 2 January 2018 at 15:33, John McCall via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Hey, Richard et al. Akira and I were talking about the right ABI rule for > deciding can-pass-in-registers-ness for

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-03 Thread Akira Hatanaka via cfe-commits
> On Jan 2, 2018, at 9:42 AM, David Blaikie via cfe-commits > wrote: > > > > On Tue, Dec 19, 2017 at 9:43 PM Akira Hatanaka > wrote: > On Tue, Dec 12, 2017 at 12:12 PM, John McCall > wrote: > On Tue, Dec 12, 2017 at 1:45 PM, David Blaiki

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-03 Thread Akira Hatanaka via cfe-commits
> On Jan 3, 2018, at 10:25 AM, John McCall wrote: > > On Wed, Jan 3, 2018 at 12:24 PM, Akira Hatanaka > wrote: >> On Jan 2, 2018, at 9:42 AM, David Blaikie via cfe-commits >> mailto:cfe-commits@lists.llvm.org>> wrote: >> >> >> >> On Tue, Dec 19, 2017 at 9:43 PM

Re: [PATCH] D41039: Add support for attribute "trivial_abi"

2018-01-03 Thread Akira Hatanaka via cfe-commits
> On Jan 3, 2018, at 6:39 PM, John McCall wrote: > > On Wed, Jan 3, 2018 at 2:07 PM, Akira Hatanaka > wrote: >> On Jan 3, 2018, at 10:25 AM, John McCall > > wrote: >> >> On Wed, Jan 3, 2018 at 12:24 PM, Akira Hatanaka >

r326530 - Add an option to disable tail-call optimization for escaping blocks.

2018-03-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 1 17:53:15 2018 New Revision: 326530 URL: http://llvm.org/viewvc/llvm-project?rev=326530&view=rev Log: Add an option to disable tail-call optimization for escaping blocks. This makes it easier to debug crashes and hangs in block functions since users can easily fin

r326531 - Remove debugging code I accidentally committed in r326530.

2018-03-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 1 18:03:21 2018 New Revision: 326531 URL: http://llvm.org/viewvc/llvm-project?rev=326531&view=rev Log: Remove debugging code I accidentally committed in r326530. Modified: cfe/trunk/lib/Sema/SemaPseudoObject.cpp Modified: cfe/trunk/lib/Sema/SemaPseudoObject.cp

r327204 - [Driver] Pass Default=false to hasFlag.

2018-03-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Mar 9 21:55:21 2018 New Revision: 327204 URL: http://llvm.org/viewvc/llvm-project?rev=327204&view=rev Log: [Driver] Pass Default=false to hasFlag. I forgot to do this in r326530. Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp cfe/trunk/test/Driver/fno-esc

r327206 - [ObjC] Allow declaring __weak pointer fields in C structs in ARC.

2018-03-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Mar 9 22:36:08 2018 New Revision: 327206 URL: http://llvm.org/viewvc/llvm-project?rev=327206&view=rev Log: [ObjC] Allow declaring __weak pointer fields in C structs in ARC. This patch uses the infrastructure added in r326307 for enabling non-trivial fields to be declar

Re: r327206 - [ObjC] Allow declaring __weak pointer fields in C structs in ARC.

2018-03-12 Thread Akira Hatanaka via cfe-commits
anges behavior for compiling C++ code as we > are seeing test failures caused by this change in our internal tests. > > I'm still trying to reduce a reproducer for the failure. In the meantime, > could you please double check if this affects C++? > > Thanks, > Eric

Re: r327206 - [ObjC] Allow declaring __weak pointer fields in C structs in ARC.

2018-03-12 Thread Akira Hatanaka via cfe-commits
t;> Hi Akira, >> >> It seems that this commit also changes behavior for compiling C++ code as we >> are seeing test failures caused by this change in our internal tests. >> >> I'm still trying to reduce a reproducer for the failure. In the meantime, >>

Re: r327206 - [ObjC] Allow declaring __weak pointer fields in C structs in ARC.

2018-03-12 Thread Akira Hatanaka via cfe-commits
on, Mar 12, 2018 at 3:56 PM Eric Liu >> <mailto:ioe...@google.com>> wrote: >>> Hi Akira, >>> >>> It seems that this commit also changes behavior for compiling C++ code as >>> we are seeing test failures caused by this change in our internal test

r327294 - Revert "[ObjC] Allow declaring __weak pointer fields in C structs in

2018-03-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Mar 12 10:05:06 2018 New Revision: 327294 URL: http://llvm.org/viewvc/llvm-project?rev=327294&view=rev Log: Revert "[ObjC] Allow declaring __weak pointer fields in C structs in ARC." This reverts commit r327206 as there were test failures caused by this patch. http://l

r327434 - Serialize the NonTrivialToPrimitive* flags I added in r326307.

2018-03-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Mar 13 11:58:25 2018 New Revision: 327434 URL: http://llvm.org/viewvc/llvm-project?rev=327434&view=rev Log: Serialize the NonTrivialToPrimitive* flags I added in r326307. rdar://problem/38421774 Modified: cfe/trunk/include/clang/AST/Decl.h cfe/trunk/lib/Sema/Se

r327464 - Check that a field is not annotated with attribute "unavailable" before

2018-03-13 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Mar 13 16:37:51 2018 New Revision: 327464 URL: http://llvm.org/viewvc/llvm-project?rev=327464&view=rev Log: Check that a field is not annotated with attribute "unavailable" before setting the NonTrivialToPrimitive* flags of a record. Union fields that have non-trivial O

r327870 - [ObjC] Allow declaring __weak pointer fields in C structs in ARC.

2018-03-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Mar 19 10:38:40 2018 New Revision: 327870 URL: http://llvm.org/viewvc/llvm-project?rev=327870&view=rev Log: [ObjC] Allow declaring __weak pointer fields in C structs in ARC. This patch uses the infrastructure added in r326307 for enabling non-trivial fields to be declar

r327939 - [CodeGen] Ignore OpaqueValueExprs that are unique references to their

2018-03-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Mar 19 18:47:58 2018 New Revision: 327939 URL: http://llvm.org/viewvc/llvm-project?rev=327939&view=rev Log: [CodeGen] Ignore OpaqueValueExprs that are unique references to their source expressions when iterating over a PseudoObjectExpr's semantic subexpression list. Pre

r334569 - [Sema] When the address of a member function is used as a template

2018-06-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jun 12 22:26:23 2018 New Revision: 334569 URL: http://llvm.org/viewvc/llvm-project?rev=334569&view=rev Log: [Sema] When the address of a member function is used as a template argument, use the context in which it is used for checking its accessibility. This fixes PR3289

r335021 - [Sema] Produce diagnostics for attribute 'trivial_abi' that appears

2018-06-18 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Jun 18 22:04:44 2018 New Revision: 335021 URL: http://llvm.org/viewvc/llvm-project?rev=335021&view=rev Log: [Sema] Produce diagnostics for attribute 'trivial_abi' that appears after the closing brace of a class declaration. Merge the two call sites of checkIllFormedTriv

r335189 - Use cast instead of dyn_cast_or_null.

2018-06-20 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jun 20 15:56:59 2018 New Revision: 335189 URL: http://llvm.org/viewvc/llvm-project?rev=335189&view=rev Log: Use cast instead of dyn_cast_or_null. This addresses John's post-commit review feedback. https://reviews.llvm.org/rC335021#inline-2038 Modified: cfe/trunk/l

[clang-tools-extra] r344827 - Disable unittests/clangd/JSONTransportTests.cpp on versions of macosx

2018-10-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 19 19:11:45 2018 New Revision: 344827 URL: http://llvm.org/viewvc/llvm-project?rev=344827&view=rev Log: Disable unittests/clangd/JSONTransportTests.cpp on versions of macosx earlier than 10.13. rdar://problem/45310173 Modified: clang-tools-extra/trunk/unittests

r344833 - [CodeGen] Use the mangle context owned by CodeGenModule to correctly

2018-10-19 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Oct 19 22:45:01 2018 New Revision: 344833 URL: http://llvm.org/viewvc/llvm-project?rev=344833&view=rev Log: [CodeGen] Use the mangle context owned by CodeGenModule to correctly mangle types of lambda objects captured by a block instead of creating a new mangle context ev

[clang-tools-extra] r344856 - Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking

2018-10-20 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Sat Oct 20 10:35:50 2018 New Revision: 344856 URL: http://llvm.org/viewvc/llvm-project?rev=344856&view=rev Log: Check that __MAC_OS_X_VERSION_MIN_REQUIRED is defined before checking whether it is too old. Modified: clang-tools-extra/trunk/unittests/clangd/JSONTransportT

r350917 - [Sema] If CheckPlaceholderExpr rewrites the initializer of an auto

2019-01-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jan 10 20:57:34 2019 New Revision: 350917 URL: http://llvm.org/viewvc/llvm-project?rev=350917&view=rev Log: [Sema] If CheckPlaceholderExpr rewrites the initializer of an auto variable during auto type deduction, use the rewritten initializer when performing initializatio

r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-10 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jan 10 23:06:38 2019 New Revision: 350920 URL: http://llvm.org/viewvc/llvm-project?rev=350920&view=rev Log: [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed to it is a trivial_abi class. A class that has all of its copy and move constructors delete

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-15 Thread Akira Hatanaka via cfe-commits
treating certain special members as if they were trivial when determining whether we can pass in registers, and that's not true any more, because the ABI says that classes with only deleted copy and move ctors is never passed in registers regardless of triviality.On Thu, 10 Jan 2019, 23:10 A

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-16 Thread Akira Hatanaka via cfe-commits
> On Jan 16, 2019, at 4:20 PM, John McCall via cfe-commits > wrote: > > > > On 16 Jan 2019, at 18:32, Richard Smith wrote: > >> On Wed, 16 Jan 2019 at 09:10, John McCall via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> On 16 Jan 2019, at 9:13, Aaron Ballman wrote: >>> O

r351911 - [Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed

2019-01-22 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Jan 22 16:55:48 2019 New Revision: 351911 URL: http://llvm.org/viewvc/llvm-project?rev=351911&view=rev Log: [Sema][ObjC] Check whether a DelayedDiagnosticPool has been pushed before adding a delayed diagnostic to DelayedDiagnostics. This fixes an assertion failure in Se

r346209 - os_log: Minor code cleanups. NFC.

2018-11-05 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Nov 5 21:41:33 2018 New Revision: 346209 URL: http://llvm.org/viewvc/llvm-project?rev=346209&view=rev Log: os_log: Minor code cleanups. NFC. Also, add a new test case and fix an incorrect comment. Modified: cfe/trunk/include/clang/AST/OSLog.h cfe/trunk/lib/AST

r346210 - os_log: Add a new privacy annotation "sensitive".

2018-11-05 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Nov 5 22:26:17 2018 New Revision: 346210 URL: http://llvm.org/viewvc/llvm-project?rev=346210&view=rev Log: os_log: Add a new privacy annotation "sensitive". This is a stricter privacy annotation than "private", which will be used for data that shouldn’t be logged to di

r346211 - os_log: Allow specifying mask type in format string.

2018-11-05 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Nov 5 23:05:14 2018 New Revision: 346211 URL: http://llvm.org/viewvc/llvm-project?rev=346211&view=rev Log: os_log: Allow specifying mask type in format string. A mask type is a 1 to 8-byte string that follows the "mask." annotation in the format string. This enables ob

r346212 - Cast to uint64_t instead of to unsigned.

2018-11-05 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Nov 5 23:12:28 2018 New Revision: 346212 URL: http://llvm.org/viewvc/llvm-project?rev=346212&view=rev Log: Cast to uint64_t instead of to unsigned. This is a follow-up to r346211. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk/lib/CodeGen/CGBui

r355012 - Avoid needlessly copying a block to the heap when a block literal

2019-02-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 27 10:17:16 2019 New Revision: 355012 URL: http://llvm.org/viewvc/llvm-project?rev=355012&view=rev Log: Avoid needlessly copying a block to the heap when a block literal initializes a local auto variable or is assigned to a local auto variable that is declared in the

r355017 - Add triples to the test I committed in r355012 to fix windows bots.

2019-02-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Feb 27 10:59:52 2019 New Revision: 355017 URL: http://llvm.org/viewvc/llvm-project?rev=355017&view=rev Log: Add triples to the test I committed in r355012 to fix windows bots. Modified: cfe/trunk/test/PCH/arc-blocks.mm Modified: cfe/trunk/test/PCH/arc-blocks.mm URL

r355175 - [Sema][ObjC] Allow silencing -Wobjc-designated-initializers warnings by

2019-02-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Feb 28 22:43:20 2019 New Revision: 355175 URL: http://llvm.org/viewvc/llvm-project?rev=355175&view=rev Log: [Sema][ObjC] Allow silencing -Wobjc-designated-initializers warnings by declaring an unavailable method in the subclass's extension that overrides the designated i

r355662 - [ObjC] Emit a boxed expression as a compile-time constant if the

2019-03-07 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 7 20:45:37 2019 New Revision: 355662 URL: http://llvm.org/viewvc/llvm-project?rev=355662&view=rev Log: [ObjC] Emit a boxed expression as a compile-time constant if the expression inside the parentheses is a valid UTF-8 string literal. Previously clang emitted an ex

r355664 - Fix test case committed in r355662.

2019-03-07 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 7 21:30:54 2019 New Revision: 355664 URL: http://llvm.org/viewvc/llvm-project?rev=355664&view=rev Log: Fix test case committed in r355662. Build bots were failing because wide string literals don't have type 'int *' on some targets. Modified: cfe/trunk/test/Se

r355700 - Use {{.*}} in test case to match the type of wide string literals.

2019-03-08 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Mar 8 07:20:12 2019 New Revision: 355700 URL: http://llvm.org/viewvc/llvm-project?rev=355700&view=rev Log: Use {{.*}} in test case to match the type of wide string literals. The type of wide string literals varies depending on the target. Modified: cfe/trunk/test/

r356156 - [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol

2019-03-14 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 14 08:17:37 2019 New Revision: 356156 URL: http://llvm.org/viewvc/llvm-project?rev=356156&view=rev Log: [CodeGen][ObjC] Remove the leading 'l' from symbols for protocol metadata and protocol list The leading 'l' tells ld64 to remove the symbol name, which can make d

r356705 - [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue

2019-03-21 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 21 12:59:49 2019 New Revision: 356705 URL: http://llvm.org/viewvc/llvm-project?rev=356705&view=rev Log: [CodeGen][ObjC] Annotate calls to objc_retainAutoreleasedReturnValue with notail on x86-64. On x86-64, the epilogue code inserted before the tail jump blocks the

r357228 - Fix typos and formatting. NFC.

2019-03-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 28 17:23:17 2019 New Revision: 357228 URL: http://llvm.org/viewvc/llvm-project?rev=357228&view=rev Log: Fix typos and formatting. NFC. Modified: cfe/trunk/lib/CodeGen/CGNonTrivialStruct.cpp Modified: cfe/trunk/lib/CodeGen/CGNonTrivialStruct.cpp URL: http://llv

r357229 - [CodeGen][ObjC] Adjust the addresses passed to calls to synthesized

2019-03-28 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Mar 28 17:23:20 2019 New Revision: 357229 URL: http://llvm.org/viewvc/llvm-project?rev=357229&view=rev Log: [CodeGen][ObjC] Adjust the addresses passed to calls to synthesized copy/move constructor/assignment operator functions for non-trivial C structs. This commit fix

r358048 - [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of

2019-04-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 9 23:20:23 2019 New Revision: 358048 URL: http://llvm.org/viewvc/llvm-project?rev=358048&view=rev Log: [CodeGen][ObjC] Emit the retainRV marker as a module flag instead of named metadata. This fixes a bug where ARC contract wasn't inserting the retainRV marker when

r358624 - [Sema][ObjC] Don't warn about an implicitly retained self if the

2019-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Apr 17 16:14:44 2019 New Revision: 358624 URL: http://llvm.org/viewvc/llvm-project?rev=358624&view=rev Log: [Sema][ObjC] Don't warn about an implicitly retained self if the retaining block and all of the enclosing blocks are non-escaping. If the block implicitly retaini

r358627 - Move the implementation of getInnermostBlockDecl to the .cpp file to fix

2019-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Apr 17 17:00:16 2019 New Revision: 358627 URL: http://llvm.org/viewvc/llvm-project?rev=358627&view=rev Log: Move the implementation of getInnermostBlockDecl to the .cpp file to fix failing bots. Modified: cfe/trunk/include/clang/AST/DeclBase.h cfe/trunk/lib/AST/

r359049 - Improve -Wuninitialized warning under ARC for block variables that are

2019-04-23 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 23 16:52:02 2019 New Revision: 359049 URL: http://llvm.org/viewvc/llvm-project?rev=359049&view=rev Log: Improve -Wuninitialized warning under ARC for block variables that are recursively captured. Under ARC, a block variable is zero-initialized when it is recursivel

r359761 - Fix typo in test case.

2019-05-02 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 2 00:38:07 2019 New Revision: 359761 URL: http://llvm.org/viewvc/llvm-project?rev=359761&view=rev Log: Fix typo in test case. Modified: cfe/trunk/test/CodeGenObjC/protocols.m Modified: cfe/trunk/test/CodeGenObjC/protocols.m URL: http://llvm.org/viewvc/llvm-pr

r359864 - [Sema][ObjC] Disable -Wunused-parameter for ObjC methods

2019-05-03 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri May 3 00:19:46 2019 New Revision: 359864 URL: http://llvm.org/viewvc/llvm-project?rev=359864&view=rev Log: [Sema][ObjC] Disable -Wunused-parameter for ObjC methods The warning isn't very useful when the function is an ObjC method. rdar://problem/41561853 Differential

r360359 - [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make

2019-05-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 9 10:43:52 2019 New Revision: 360359 URL: http://llvm.org/viewvc/llvm-project?rev=360359&view=rev Log: [CodeGen][ObjC] Remove the leading `l_` from ObjC symbols and make private symbols in the __DATA segment internal. This prevents the linker from removing the symb

r360361 - Specify ObjC runtime to fix the tests I committed in r360359 that are

2019-05-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 9 11:05:17 2019 New Revision: 360361 URL: http://llvm.org/viewvc/llvm-project?rev=360361&view=rev Log: Specify ObjC runtime to fix the tests I committed in r360359 that are failing. Modified: cfe/trunk/test/CodeGenObjC/externally-initialized-selectors.m cfe

r360363 - Specify target triple to fix the tests I committed in r360359 that are

2019-05-09 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu May 9 11:32:16 2019 New Revision: 360363 URL: http://llvm.org/viewvc/llvm-project?rev=360363&view=rev Log: Specify target triple to fix the tests I committed in r360359 that are still failing. Modified: cfe/trunk/test/CodeGenObjC/externally-initialized-selectors.m

r343518 - Distinguish `__block` variables that are captured by escaping blocks

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 11:50:14 2018 New Revision: 343518 URL: http://llvm.org/viewvc/llvm-project?rev=343518&view=rev Log: Distinguish `__block` variables that are captured by escaping blocks from those that aren't. This patch changes the way __block variables that aren't captured by

r343531 - Revert r343518.

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 13:29:34 2018 New Revision: 343531 URL: http://llvm.org/viewvc/llvm-project?rev=343531&view=rev Log: Revert r343518. Bots are still failing. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/24420 http://lab.llvm.org:8011/builders/llvm-clang-x

r343542 - Distinguish `__block` variables that are captured by escaping blocks

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 14:51:28 2018 New Revision: 343542 URL: http://llvm.org/viewvc/llvm-project?rev=343542&view=rev Log: Distinguish `__block` variables that are captured by escaping blocks from those that aren't. This patch changes the way __block variables that aren't captured by

r343556 - [CodeGen] Before entering the loop that copies a non-trivial array field

2018-10-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Mon Oct 1 18:00:44 2018 New Revision: 343556 URL: http://llvm.org/viewvc/llvm-project?rev=343556&view=rev Log: [CodeGen] Before entering the loop that copies a non-trivial array field of a non-trivial C struct, copy the preceding trivial fields that haven't been copied. Th

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-31 Thread Akira Hatanaka via cfe-commits
Would it be better if we disallowed trivial_abi if the class’ copy and move destructors were all deleted (and revert r350920)? I think that would make it easier to reason about when you are allowed to use trivial_abi and what effect the attribute has (which is to override the trivialness for the

r352822 - Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed"

2019-01-31 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Thu Jan 31 16:12:06 2019 New Revision: 352822 URL: http://llvm.org/viewvc/llvm-project?rev=352822&view=rev Log: Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed" This reverts commit r350920 as it is not clear whether we should force a class to

Re: r350920 - [Sema] Make canPassInRegisters return true if the CXXRecordDecl passed

2019-01-31 Thread Akira Hatanaka via cfe-commits
Reverted patch in r352822. I’ll send a new patch later that disallows trivial_abi on classes without non-deleted copy or move constructors. > On Jan 31, 2019, at 3:52 PM, Richard Smith wrote: > > Given that there's uncertainty as to how to proceed and this patch > affects the ABI, I would prefe

r352949 - [Sema][ObjC] Allow declaring ObjC pointer members with non-trivial

2019-02-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Feb 1 18:23:40 2019 New Revision: 352949 URL: http://llvm.org/viewvc/llvm-project?rev=352949&view=rev Log: [Sema][ObjC] Allow declaring ObjC pointer members with non-trivial ownership qualifications in C++ unions under ARC. An ObjC pointer member with non-trivial owner

  1   2   3   4   5   6   7   8   9   10   >