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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user