diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2018-03-20 00:45:03 +0000 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2018-03-20 00:45:03 +0000 |
| commit | 849217abdf784fa3babec81b6d3387a2e4096e56 (patch) | |
| tree | 22d36df3abefc613a50b796d51870b5ce33f18e8 /llvm/test | |
| parent | dc09ebf71b5ad1ac45340ccd24cbb8c2ecffb762 (diff) | |
| download | bcm5719-llvm-849217abdf784fa3babec81b6d3387a2e4096e56.tar.gz bcm5719-llvm-849217abdf784fa3babec81b6d3387a2e4096e56.zip | |
Object: Fix handling of @@@ in .symver directive
Summary:
name@@@nodename is going to be replaced with name@@nodename if symbols is
defined in the assembled file, or name@nodename if undefined.
https://sourceware.org/binutils/docs/as/Symver.html
Fixes PR36623
Reviewers: pcc, espindola
Subscribers: mehdi_amini, hiraditya
Differential Revision: https://reviews.llvm.org/D44274
llvm-svn: 327930
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/LTO/X86/symver-asm3.ll | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/llvm/test/LTO/X86/symver-asm3.ll b/llvm/test/LTO/X86/symver-asm3.ll new file mode 100644 index 00000000000..90cee28bf60 --- /dev/null +++ b/llvm/test/LTO/X86/symver-asm3.ll @@ -0,0 +1,40 @@ +; Test special handling of @@@. + +; RUN: llvm-as < %s >%t1 +; RUN: llvm-nm %t1 | FileCheck %s + +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +module asm "foo1:" +; CHECK-DAG: t foo1 + +module asm ".symver foo1, foo@@@VER1" +; CHECK-DAG: t foo@@VER1 + +module asm ".symver foo2, foo@@@VER2" +; CHECK-DAG: U foo2 +; CHECK-DAG: t foo@VER2 + +module asm ".symver foo3, foo@@@VER3" +; CHECK-DAG: t foo@@VER3 + +module asm ".symver foo4, foo@@@VER4" +; CHECK-DAG: T foo@@VER4 + +module asm ".symver foo5, foo@@@VER5" +; CHECK-DAG: T foo@VER5 + +module asm "foo3:" +; CHECK-DAG: t foo3 + +module asm ".local foo1" +module asm ".local foo3" + +define void @foo4() { +; CHECK-DAG: T foo4 + ret void +} + +declare void @foo5() +; CHECK-DAG: U foo5 |

