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)!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305118
91177308-0d34-0410-b5e6-
96231b3b80d8
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(