summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorVassil Vassilev <v.g.vassilev@gmail.com>2017-06-09 21:36:28 +0000
committerVassil Vassilev <v.g.vassilev@gmail.com>2017-06-09 21:36:28 +0000
commit41cafcd49c4ff778740f90ea87687caccdd351ca (patch)
treefc46c306d3e99e3cbd56cb0f6f6544583e1bc58b /clang
parent2e34be23a283e2a28116d5e37d4618c2c2c473ae (diff)
downloadbcm5719-llvm-41cafcd49c4ff778740f90ea87687caccdd351ca.tar.gz
bcm5719-llvm-41cafcd49c4ff778740f90ea87687caccdd351ca.zip
[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)! llvm-svn: 305118
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 36a3a60ca1e..34b10aec880 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -2658,6 +2658,8 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
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(
OpenPOWER on IntegriCloud