Re: r373159 - For P0784R7: compute whether a variable has constant destruction if it

2020-01-08 Thread Alex L via cfe-commits
Hi Richard, I posted a patch that partially reverts your commit: https://reviews.llvm.org/D72411. Unfortunately I can't revert it fully. Thanks, Alex On Mon, 11 Nov 2019 at 15:30, Alex L wrote: > Here's a reduced test case. > > ``` > // OPTIONS: -x objective-c -std=gnu99 -fobjc-arc -emit-llvm

Re: r373159 - For P0784R7: compute whether a variable has constant destruction if it

2019-11-11 Thread Alex L via cfe-commits
Here's a reduced test case. ``` // OPTIONS: -x objective-c -std=gnu99 -fobjc-arc -emit-llvm @interface Foo @end Foo *foo() { static Foo *f = ((void*)0; return f; } // CHECK-NOT: cxa_guard ``` AFAIK clang should not emit C++ guard variables in non-C++ code. Is that correct? On Mon, 11 Nov 20

Re: r373159 - For P0784R7: compute whether a variable has constant destruction if it

2019-11-11 Thread Alex L via cfe-commits
Hi Richard, I have a question about this commit. It looks like it started emitting `cxa_guard_acquire/release` calls in Objective-C code, for globals with constant initializers, causing link failures for things that don't link with libc++abi. Was that intentional? I'm still working on a reduced te