Make _ZTI symbols hidden.  This speeds up the dynamic linker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGRtti.cpp b/lib/CodeGen/CGRtti.cpp
index 9ebb908..4a9779a 100644
--- a/lib/CodeGen/CGRtti.cpp
+++ b/lib/CodeGen/CGRtti.cpp
@@ -165,6 +165,7 @@
       OGV->replaceAllUsesWith(NewPtr);
       OGV->eraseFromParent();
     }
+    GV->setVisibility(llvm::GlobalVariable::HiddenVisibility);
     return llvm::ConstantExpr::getBitCast(GV, Int8PtrTy);
   }
 
diff --git a/test/CodeGenCXX/rtti.cpp b/test/CodeGenCXX/rtti.cpp
index b64071c..f496d7a 100644
--- a/test/CodeGenCXX/rtti.cpp
+++ b/test/CodeGenCXX/rtti.cpp
@@ -57,6 +57,9 @@
 // CHECK-NEXT: .quad  __ZTIi
 // CHECK-NEXT: .quad  __ZTI7test3_I
 
+// CHECK:     .private_extern __ZTIFvvE
+// CHECK:     .globl __ZTIFvvE
+// CHECK:     .weak_definition __ZTIFvvE
 // CHECK:     __ZTIFvvE:
 // CHECK-NEXT: 	.quad	(__ZTVN10__cxxabiv120__function_type_infoE) + 16
 // CHECK-NEXT: 	.quad	__ZTSFvvE