Author: vvassilev Date: Fri Jun 9 16:36:28 2017 New Revision: 305118 URL: http://llvm.org/viewvc/llvm-project?rev=305118&view=rev Log: [modules] Fix that global delete operator get's assigned to a submodule.
n the current local-submodule-visibility mode, as soon as we discover a virtual destructor, we declare on demand a global delete operator. However, this causes that this delete operator is owned by the submodule which contains said virtual destructor. This means that other modules no longer can see the global delete operator which is hidden inside another submodule and fail to compile. This patch unhides those global allocation function once they're created to prevent this issue. Patch by Raphael Isemann (D33366)! Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=305118&r1=305117&r2=305118&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original) +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Jun 9 16:36:28 2017 @@ -2658,6 +2658,8 @@ void Sema::DeclareGlobalAllocationFuncti Context, GlobalCtx, SourceLocation(), SourceLocation(), Name, FnType, /*TInfo=*/nullptr, SC_None, false, true); Alloc->setImplicit(); + // Global allocation functions should always be visible. + Alloc->setHidden(false); // Implicit sized deallocation functions always have default visibility. Alloc->addAttr( _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits