Emit standard-library RTTI with external linkage, not weak_odr.

Apply hidden visibility to most RTTI;  libstdc++ does not rely on exact
pointer equality for the type info (just the type info names).  Apply
the same optimization to RTTI that we do to vtables.

Fixes PR5962.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110192 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp
index 9b93a31..67980ed 100644
--- a/test/CodeGenCXX/vtable-linkage.cpp
+++ b/test/CodeGenCXX/vtable-linkage.cpp
@@ -101,7 +101,7 @@
 // and hidden visibility (rdar://problem/7523229).
 // CHECK-2: @_ZTV1C = weak_odr hidden constant
 // CHECK-2: @_ZTS1C = weak_odr constant
-// CHECK-2: @_ZTI1C = weak_odr constant
+// CHECK-2: @_ZTI1C = weak_odr hidden constant
 
 // D has a key function that is defined in this translation unit so its vtable is
 // defined in the translation unit.
@@ -140,7 +140,7 @@
 // so its vtable should have weak_odr linkage and hidden visibility.
 // CHECK-8: @_ZTV1FIlE = weak_odr hidden constant
 // CHECK-8: @_ZTS1FIlE = weak_odr constant
-// CHECK-8: @_ZTI1FIlE = weak_odr constant
+// CHECK-8: @_ZTI1FIlE = weak_odr hidden constant
 
 // F<int> is an explicit template instantiation declaration without a
 // key function, so its vtable should have external linkage.
@@ -167,7 +167,7 @@
 // its vtable should have weak_odr linkage and hidden visibility.
 // CHECK-13: @_ZTV1FIcE = weak_odr hidden constant
 // CHECK-13: @_ZTS1FIcE = weak_odr constant
-// CHECK-13: @_ZTI1FIcE = weak_odr constant
+// CHECK-13: @_ZTI1FIcE = weak_odr hidden constant
 
 // RUN: FileCheck --check-prefix=CHECK-G %s < %t
 //