diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-17 04:22:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-07-17 04:22:25 +0000 |
commit | becfc2325c9b645d2208b2a5389b709fd3d75576 (patch) | |
tree | f0369f353399b85407bd13aeae8d92183e9a8d93 /lib/Sema/SemaDecl.cpp | |
parent | 6cfa78f6bd4e7d5e23366a0907f8f8792366bc4c (diff) |
Record visibility pragmas when we see a tag declaration. We might use it
to build a type before seeing the definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160339 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 17b120bc86..342acf825b 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -8880,6 +8880,10 @@ CreateNewDecl: if (Attr) ProcessDeclAttributeList(S, New, Attr); + // If there's a #pragma GCC visibility in scope, set the visibility of this + // record. + AddPushedVisibilityAttribute(New); + // If we're declaring or defining a tag in function prototype scope // in C, note that this type can only be used within the function. if (Name && S->isFunctionPrototypeScope() && !getLangOpts().CPlusPlus) |