Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.

(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)

llvm-svn: 95511
This commit is contained in:
Anders Carlsson
2010-02-07 01:44:36 +00:00
parent a7bcade229
commit 10d369d1a2
2 changed files with 70 additions and 0 deletions

View File

@@ -132,6 +132,10 @@ CodeGenModule::getDeclVisibilityMode(const Decl *D) const {
}
}
// This decl should have the same visibility as its parent.
if (const DeclContext *DC = D->getDeclContext())
return getDeclVisibilityMode(cast<Decl>(DC));
return getLangOptions().getVisibilityMode();
}