<p dir="ltr"><br>
On Feb 3, 2015 6:16 PM, "Juergen Ributzka" <<a href="mailto:juergen@apple.com">juergen@apple.com</a>> wrote:<br>
><br>
> Hi Larisse,<br>
><br>
> the unit test is a little too restrictive and is failing on my system (OS X):<br>
> /x/src/trunk/clang/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp:10:16: error: expected string not found in input<br>
>  // CHECK-DAG: call void @_ZdlPvm(i8* %1, i64 4)<br>
>                ^<br>
> <stdin>:1:1: note: scanning from here<br>
> ; ModuleID = '/x/src/trunk/clang/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp'<br>
> ^<br>
> <stdin>:17:2: note: possible intended match here<br>
>  call void @_ZdlPvm(i8* %5, i64 4) #2<br>
>  ^</p>
<p dir="ltr">Looks like Takumi may have already fixed that.</p>
<p dir="ltr">><br>
> —Juergen<br>
><br>
> > On Feb 3, 2015, at 3:31 PM, Larisse Voufo <<a href="mailto:lvoufo@google.com">lvoufo@google.com</a>> wrote:<br>
> ><br>
> > Author: lvoufo<br>
> > Date: Tue Feb  3 17:31:50 2015<br>
> > New Revision: 228066<br>
> ><br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=228066&view=rev">http://llvm.org/viewvc/llvm-project?rev=228066&view=rev</a><br>
> > Log:<br>
> > PR22419: Give implicit sized deallocation functions default visibility<br>
> ><br>
> > Added:<br>
> >    cfe/trunk/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp<br>
> > Modified:<br>
> >    cfe/trunk/lib/AST/Decl.cpp<br>
> ><br>
> > Modified: cfe/trunk/lib/AST/Decl.cpp<br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=228066&r1=228065&r2=228066&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=228066&r1=228065&r2=228066&view=diff</a><br>
> > ==============================================================================<br>
> > --- cfe/trunk/lib/AST/Decl.cpp (original)<br>
> > +++ cfe/trunk/lib/AST/Decl.cpp Tue Feb  3 17:31:50 2015<br>
> > @@ -666,7 +666,12 @@ static LinkageInfo getLVForNamespaceScop<br>
> >       // Use global type/value visibility as appropriate.<br>
> >       Visibility globalVisibility;<br>
> >       if (computation == LVForValue) {<br>
> > -        globalVisibility = Context.getLangOpts().getValueVisibilityMode();<br>
> > +        const FunctionDecl *FD = D->getAsFunction();<br>
> > +        if (FD && FD->getCorrespondingUnsizedGlobalDeallocationFunction())<br>
> > +          // C++14's implicit sized deallocation functions always have default visibility.<br>
> > +          globalVisibility = DefaultVisibility;<br>
> > +        else<br>
> > +          globalVisibility = Context.getLangOpts().getValueVisibilityMode();<br>
> >       } else {<br>
> >         assert(computation == LVForType);<br>
> >         globalVisibility = Context.getLangOpts().getTypeVisibilityMode();<br>
> ><br>
> > Added: cfe/trunk/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp<br>
> > URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp?rev=228066&view=auto">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp?rev=228066&view=auto</a><br>
> > ==============================================================================<br>
> > --- cfe/trunk/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp (added)<br>
> > +++ cfe/trunk/test/CodeGenCXX/cxx14-implicit-sized-delete.cpp Tue Feb  3 17:31:50 2015<br>
> > @@ -0,0 +1,27 @@<br>
> > +// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - -std=c++14 %s 2>&1 | FileCheck %s -check-prefix=CHECKDEF -check-prefix=CHECK<br>
> > +// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - -std=c++14 -fvisibility hidden %s 2>&1 | FileCheck %s -check-prefix=CHECKHID -check-prefix=CHECK<br>
> > +<br>
> > +// PR22419: Implicit sized deallocation functions always have default visibility.<br>
> > +<br>
> > +// CHECKDEF-DAG: define void @_Z3fooPi(i32* %is)<br>
> > +// CHECKHID-DAG: define hidden void @_Z3fooPi(i32* %is)<br>
> > +void foo(int* is) {<br>
> > +<br>
> > +  // CHECK-DAG: call void @_ZdlPvm(i8* %1, i64 4)<br>
> > +  delete is;<br>
> > +}<br>
> > +<br>
> > +// CHECK-DAG: define linkonce void @_ZdlPvm(i8*, i64)<br>
> > +<br>
> > +// CHECK-DAG: %struct.A = type { i8 }<br>
> > +struct A { ~A() { }};<br>
> > +<br>
> > +// CHECKDEF-DAG: define void @_Z1fP1A(%struct.A* %p)<br>
> > +// CHECKHID-DAG: define hidden void @_Z1fP1A(%struct.A* %p)<br>
> > +void f(A *p) {<br>
> > +<br>
> > +  // CHECK-DAG: call void @_ZdaPvm(i8* %2, i64 %6)<br>
> > +  delete[] p;<br>
> > +}<br>
> > +<br>
> > +// CHECK-DAG: define linkonce void @_ZdaPvm(i8*, i64)<br>
> > \ No newline at end of file<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > cfe-commits mailing list<br>
> > <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</p>