summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-11-02 18:38:13 +0000
committerJohn McCall <rjmccall@apple.com>2010-11-02 18:38:13 +0000
commit23032653d744b889c23c68f5e807dcefb2a3c7c4 (patch)
tree67b0e0f1a4a42af5e3e755887492f02ea006f7c0 /clang/lib/AST/Decl.cpp
parent3bcbf842351fc9291f10de4b2dbc88b61e3b9188 (diff)
downloadbcm5719-llvm-23032653d744b889c23c68f5e807dcefb2a3c7c4.tar.gz
bcm5719-llvm-23032653d744b889c23c68f5e807dcefb2a3c7c4.zip
Unbreak private_extern, which apparently we had zero tests for.
llvm-svn: 118034
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 2eef54cf142..ca963ad7e59 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -278,11 +278,12 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVFlags F) {
LV.mergeVisibility(TypeLV.second);
}
+ if (Var->getStorageClass() == SC_PrivateExtern)
+ LV.setVisibility(HiddenVisibility, true);
+
if (!Context.getLangOptions().CPlusPlus &&
(Var->getStorageClass() == SC_Extern ||
Var->getStorageClass() == SC_PrivateExtern)) {
- if (Var->getStorageClass() == SC_PrivateExtern)
- LV.setVisibility(HiddenVisibility, true);
// C99 6.2.2p4:
// For an identifier declared with the storage-class specifier
@@ -307,6 +308,9 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVFlags F) {
// for justification). In practice, GCC doesn't do this, so it's
// just too painful to make work.
+ if (Function->getStorageClass() == SC_PrivateExtern)
+ LV.setVisibility(HiddenVisibility, true);
+
// C99 6.2.2p5:
// If the declaration of an identifier for a function has no
// storage-class specifier, its linkage is determined exactly
OpenPOWER on IntegriCloud