diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2010-08-05 06:57:20 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2010-08-05 06:57:20 +0000 |
| commit | 570024a8d9b4a4aa4a35f077a0a65003dc7b71fe (patch) | |
| tree | ccef452e0e9e6de88bf5965f706d54ed2a416441 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | ef7c0ffe40cd6ac9662ee074cd97daaef6d7eaa1 (diff) | |
| download | bcm5719-llvm-570024a8d9b4a4aa4a35f077a0a65003dc7b71fe.tar.gz bcm5719-llvm-570024a8d9b4a4aa4a35f077a0a65003dc7b71fe.zip | |
Implement #pragma GCC visibility.
llvm-svn: 110315
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d2be5af14a4..63384025799 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -190,9 +190,11 @@ CodeGenModule::getDeclVisibilityMode(const Decl *D) const { return LangOptions::Hidden; } - // This decl should have the same visibility as its parent. + // If this decl is contained in a class, it should have the same visibility + // as the parent class. if (const DeclContext *DC = D->getDeclContext()) - return getDeclVisibilityMode(cast<Decl>(DC)); + if (DC->isRecord()) + return getDeclVisibilityMode(cast<Decl>(DC)); return getLangOptions().getVisibilityMode(); } |

