]> granicus.if.org Git - clang/commit
Disable caching of visibility.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 12 Jan 2013 06:42:30 +0000 (06:42 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 12 Jan 2013 06:42:30 +0000 (06:42 +0000)
commit838dc597e25614c653a062a124b06a04d6b7f5eb
tree2c93daa5ee846c400fdfdc9b335b829f74048958
parentbcfdd263b79c766db9154b009bd831ef83090c83
Disable caching of visibility.

The testcase in pr14929 shows that this is extremely hard to do. If we choose
to apply the attribute, that causes the visibility of some decls to change and
that can happen really late (during codegen).

Current gcc warns and ignores the attribute in this testcase with a warning.
This suggest that the correct solution is to find a point in the compilation
where we can compute the visibility and
* assert it was never computed before
* reject any attempts to compute it again in the future (with warnings).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172305 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Decl.h
include/clang/AST/DeclBase.h
include/clang/AST/Type.h
lib/AST/ASTContext.cpp
lib/AST/Decl.cpp
lib/AST/Type.cpp
lib/Sema/SemaAttr.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclAttr.cpp
test/CodeGenCXX/visibility-inlines-hidden.cpp
test/CodeGenCXX/visibility.cpp