From f97c63681218fac6480525cfcd402c7d922190e9 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 17 Jul 2012 04:22:25 +0000 Subject: Record visibility pragmas when we see a tag declaration. We might use it to build a type before seeing the definition. llvm-svn: 160339 --- clang/lib/Sema/SemaDecl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Sema') 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) -- cgit v1.2.3