[llvm] r214311 - Add a small test showing when a linkonce_odr symbol can be hidden.

Rafael Espindola rafael.espindola at gmail.com
Wed Jul 30 08:31:22 PDT 2014


Author: rafael
Date: Wed Jul 30 10:31:21 2014
New Revision: 214311

URL: http://llvm.org/viewvc/llvm-project?rev=214311&view=rev
Log:
Add a small test showing when a linkonce_odr symbol can be hidden.

Modified:
    llvm/trunk/test/tools/gold/emit-llvm.ll

Modified: llvm/trunk/test/tools/gold/emit-llvm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/gold/emit-llvm.ll?rev=214311&r1=214310&r2=214311&view=diff
==============================================================================
--- llvm/trunk/test/tools/gold/emit-llvm.ll (original)
+++ llvm/trunk/test/tools/gold/emit-llvm.ll Wed Jul 30 10:31:21 2014
@@ -17,14 +17,37 @@
 
 target triple = "x86_64-unknown-linux-gnu"
 
-; CHECK: define internal void @f()
-define hidden void @f() {
+; CHECK: define internal void @f1()
+define hidden void @f1() {
   ret void
 }
 
-; CHECK: define hidden void @g()
-define hidden void @g() {
+; CHECK: define hidden void @f2()
+define hidden void @f2() {
   ret void
 }
 
- at llvm.used = appending global [1 x i8*] [ i8* bitcast (void ()* @g to i8*)]
+ at llvm.used = appending global [1 x i8*] [ i8* bitcast (void ()* @f2 to i8*)]
+
+; CHECK: define void @f3()
+define void @f3() {
+  call void @f4()
+  ret void
+}
+
+; CHECK: define internal void @f4()
+define linkonce_odr void @f4() {
+  ret void
+}
+
+; CHECK: define linkonce_odr void @f5()
+define linkonce_odr void @f5() {
+  ret void
+}
+ at g5 = global void()* @f5
+
+; CHECK: define internal void @f6() unnamed_addr
+define linkonce_odr void @f6() unnamed_addr {
+  ret void
+}
+ at g6 = global void()* @f6





More information about the llvm-commits mailing list