summaryrefslogtreecommitdiffstats
path: root/llvm/test/LTO/symver-asm.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/LTO/symver-asm.ll')
-rw-r--r--llvm/test/LTO/symver-asm.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/LTO/symver-asm.ll b/llvm/test/LTO/symver-asm.ll
new file mode 100644
index 00000000000..03dda2bedd9
--- /dev/null
+++ b/llvm/test/LTO/symver-asm.ll
@@ -0,0 +1,16 @@
+; RUN: llvm-as < %s >%t1
+; RUN: llvm-lto -o %t2 %t1
+; RUN: llvm-nm %t2 | FileCheck %s
+
+target triple = "x86_64-unknown-linux-gnu"
+
+module asm ".symver io_cancel_0_4,io_cancel@@LIBAIO_0.4"
+
+; Even without -exported-symbol, io_cancel_0_4 should be noticed by LTOModule's
+; RecordStreamer, so it shouldn't get eliminated. However, the object file will
+; contain the aliased symver as well as the original.
+define i32 @io_cancel_0_4() {
+; CHECK: io_cancel@@LIBAIO_0.4
+; CHECK: io_cancel_0_4
+ ret i32 0
+}
OpenPOWER on IntegriCloud