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 | f97c63681218fac6480525cfcd402c7d922190e9 (patch) | |
| tree | 7b73d505daf6cd594f141568dae05acd0812486c /clang/lib/Sema | |
| parent | 23f59509a8790b04c691ec063c55724a3bfee7eb (diff) | |
| download | bcm5719-llvm-f97c63681218fac6480525cfcd402c7d922190e9.tar.gz bcm5719-llvm-f97c63681218fac6480525cfcd402c7d922190e9.zip | |
Record visibility pragmas when we see a tag declaration. We might use it
to build a type before seeing the definition.
llvm-svn: 160339
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 17b120bc866..342acf825b5 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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) |

