diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-05 19:56:53 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-08-05 19:56:53 +0000 |
| commit | c03b6e78809b120f482604b3047c3888879ee29e (patch) | |
| tree | a543dc1a585b0881ded7eab6a4103a854eff1f2e | |
| parent | a746239be3092c7b27d7e9b3cc81bd612bf641d5 (diff) | |
| download | bcm5719-llvm-c03b6e78809b120f482604b3047c3888879ee29e.tar.gz bcm5719-llvm-c03b6e78809b120f482604b3047c3888879ee29e.zip | |
Add a test showing the interaction of linker scripts and plugin.
In particular, the linker script is processed early enough for function g
to be internalized.
llvm-svn: 214916
| -rw-r--r-- | llvm/test/tools/gold/Inputs/linker-script.export | 5 | ||||
| -rw-r--r-- | llvm/test/tools/gold/linker-script.ll | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/tools/gold/Inputs/linker-script.export b/llvm/test/tools/gold/Inputs/linker-script.export new file mode 100644 index 00000000000..2062a081ffe --- /dev/null +++ b/llvm/test/tools/gold/Inputs/linker-script.export @@ -0,0 +1,5 @@ +{ + global: + f; + local: *; +}; diff --git a/llvm/test/tools/gold/linker-script.ll b/llvm/test/tools/gold/linker-script.ll new file mode 100644 index 00000000000..35a769453e5 --- /dev/null +++ b/llvm/test/tools/gold/linker-script.ll @@ -0,0 +1,17 @@ +; RUN: llvm-as %s -o %t.o + +; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \ +; RUN: --plugin-opt=emit-llvm \ +; RUN: -shared %t.o -o %t2.o \ +; RUN: -version-script=%p/Inputs/linker-script.export +; RUN: llvm-dis %t2.o -o - | FileCheck %s + +; CHECK: define void @f() +define void @f() { + ret void +} + +; CHECK: define internal void @g() +define void @g() { + ret void +} |

