diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-25 07:31:49 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-12-25 07:31:49 +0000 |
commit | 54606d57a2255815edbed8600540a802c1728721 (patch) | |
tree | 602a28810c997631c57d7c923fb913172c64f768 /clang/test/CodeGenCXX/visibility-inlines-hidden.cpp | |
parent | 181f504d822f968bc851e926b1135f3a10b8e12d (diff) | |
download | bcm5719-llvm-54606d57a2255815edbed8600540a802c1728721.tar.gz bcm5719-llvm-54606d57a2255815edbed8600540a802c1728721.zip |
Add 171048 back but invalidate the cache of all redeclarations when setting
the body of a functions. The problem was that hasBody looks at the entire chain
and causes problems to -fvisibility-inlines-hidden if the cache was not
invalidated.
Original message:
Cache visibility of decls.
This unifies the linkage and visibility caching. I first implemented this when
working on pr13844, but the previous fixes removed the performance advantage of
this one.
This is still a step in the right direction for making linkage and visibility
cheap to use.
llvm-svn: 171053
Diffstat (limited to 'clang/test/CodeGenCXX/visibility-inlines-hidden.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/visibility-inlines-hidden.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp index 8519c8ced89..0681adda839 100644 --- a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp +++ b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp @@ -135,3 +135,15 @@ namespace test4 { } // CHECK: define available_externally void @_ZN5test43fooE } + +namespace test5 { + // just don't crash. + template <int> inline void Op(); + class UnaryInstruction { + UnaryInstruction() { + Op<0>(); + } + }; + template <int Idx_nocapture> void Op() { + } +} |