[cfe-commits] r89185 - in /cfe/trunk: lib/CodeGen/CGRtti.cpp test/CodeGenCXX/rtti.cpp

Mike Stump mrs at apple.com
Tue Nov 17 18:53:28 PST 2009


Author: mrs
Date: Tue Nov 17 20:53:28 2009
New Revision: 89185

URL: http://llvm.org/viewvc/llvm-project?rev=89185&view=rev
Log:
Make _ZTI symbols hidden.  This speeds up the dynamic linker.

Modified:
    cfe/trunk/lib/CodeGen/CGRtti.cpp
    cfe/trunk/test/CodeGenCXX/rtti.cpp

Modified: cfe/trunk/lib/CodeGen/CGRtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRtti.cpp?rev=89185&r1=89184&r2=89185&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGRtti.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRtti.cpp Tue Nov 17 20:53:28 2009
@@ -165,6 +165,7 @@
       OGV->replaceAllUsesWith(NewPtr);
       OGV->eraseFromParent();
     }
+    GV->setVisibility(llvm::GlobalVariable::HiddenVisibility);
     return llvm::ConstantExpr::getBitCast(GV, Int8PtrTy);
   }
 

Modified: cfe/trunk/test/CodeGenCXX/rtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rtti.cpp?rev=89185&r1=89184&r2=89185&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenCXX/rtti.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rtti.cpp Tue Nov 17 20:53:28 2009
@@ -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





More information about the cfe-commits mailing list