[llvm] r259394 - Add a test for r258362.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 11:56:12 PST 2016
Author: rafael
Date: Mon Feb 1 13:56:12 2016
New Revision: 259394
URL: http://llvm.org/viewvc/llvm-project?rev=259394&view=rev
Log:
Add a test for r258362.
Thanks to Mehdi for finding it.
Added:
llvm/trunk/test/Linker/Inputs/funcimport2.ll
llvm/trunk/test/Linker/funcimport2.ll
Added: llvm/trunk/test/Linker/Inputs/funcimport2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/Inputs/funcimport2.ll?rev=259394&view=auto
==============================================================================
--- llvm/trunk/test/Linker/Inputs/funcimport2.ll (added)
+++ llvm/trunk/test/Linker/Inputs/funcimport2.ll Mon Feb 1 13:56:12 2016
@@ -0,0 +1,8 @@
+define linkonce_odr hidden void @foo() {
+ ret void
+}
+
+define void @bar() {
+ call void @foo()
+ ret void
+}
Added: llvm/trunk/test/Linker/funcimport2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/funcimport2.ll?rev=259394&view=auto
==============================================================================
--- llvm/trunk/test/Linker/funcimport2.ll (added)
+++ llvm/trunk/test/Linker/funcimport2.ll Mon Feb 1 13:56:12 2016
@@ -0,0 +1,17 @@
+; RUN: llvm-as -function-summary %s -o %t1.bc
+; RUN: llvm-as -function-summary %p/Inputs/funcimport2.ll -o %t2.bc
+; RUN: llvm-lto -thinlto -o %t3 %t1.bc %t2.bc
+; RUN: llvm-link -import=bar:%t2.bc %t1.bc -functionindex=%t3.thinlto.bc -S | FileCheck %s
+
+; CHECK: define linkonce_odr hidden void @foo() {
+define available_externally hidden void @foo() {
+ ret void
+}
+
+declare void @bar()
+
+define void @caller() {
+ call void @bar()
+ call void @foo()
+ ret void
+}
More information about the llvm-commits
mailing list