summaryrefslogtreecommitdiffstats
path: root/llvm/test/LTO/Resolution
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-05-25 23:40:11 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-05-25 23:40:11 +0000
commitf87197ad91857bd26948ada2215627b15889dfb0 (patch)
tree1cc3c84b6f060172041809e1353b579232e73d75 /llvm/test/LTO/Resolution
parente2133d5b42684dc29dc53dc56ea70d60a1f51fbc (diff)
downloadbcm5719-llvm-f87197ad91857bd26948ada2215627b15889dfb0.tar.gz
bcm5719-llvm-f87197ad91857bd26948ada2215627b15889dfb0.zip
LTO: Do summary-based prevailing symbol resolution at --lto-O0.
Prevailing symbol resolution is necessary for correctness. Without this we can end up dropping a referenced linkonce symbol from the link. Differential Revision: https://reviews.llvm.org/D33570 llvm-svn: 303939
Diffstat (limited to 'llvm/test/LTO/Resolution')
-rw-r--r--llvm/test/LTO/Resolution/X86/linkonce.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/LTO/Resolution/X86/linkonce.ll b/llvm/test/LTO/Resolution/X86/linkonce.ll
new file mode 100644
index 00000000000..33d2df740a4
--- /dev/null
+++ b/llvm/test/LTO/Resolution/X86/linkonce.ll
@@ -0,0 +1,11 @@
+; RUN: opt -module-summary -o %t %s
+; RUN: llvm-lto2 run %t -O0 -r %t,foo,px -o %t2
+; RUN: llvm-nm %t2.0 | FileCheck %s
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+; CHECK: W foo
+define linkonce_odr void @foo() {
+ ret void
+}
OpenPOWER on IntegriCloud