aboutsummaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-10-26 18:47:48 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-10-26 18:47:48 +0000
commite5551ed9cec1ae777c4e4b8852a1d7842c2e1c3d (patch)
treeb1d115aa6a3dc373465e36d381e147ada50e1b03 /test/Other
parent276c43f022fa4a84a7c69b3d68a58e8613f69e47 (diff)
Change the internalize pass to internalize all symbols when given an empty
list of externals. This makes sense since a shared library with no symbols can still be useful if it has static constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166795 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/link-opts.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Other/link-opts.ll b/test/Other/link-opts.ll
new file mode 100644
index 0000000000..8e58ac8a56
--- /dev/null
+++ b/test/Other/link-opts.ll
@@ -0,0 +1,13 @@
+;RUN: opt -S -std-link-opts < %s | FileCheck %s
+; Simple test to check that -std-link-opts keeps only the main function.
+
+; CHECK-NOT: define
+; CHECK: define void @main
+; CHECK-NOT: define
+define void @main() {
+ ret void
+}
+
+define void @foo() {
+ ret void
+}