From f43a53680ab84d603007b06ed2ff43573072673a Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 2 Dec 2015 15:02:43 +0000 Subject: [PATCH] Add an interesting case we already get right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254514 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Linker/ctors4.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/Linker/ctors4.ll diff --git a/test/Linker/ctors4.ll b/test/Linker/ctors4.ll new file mode 100644 index 00000000000..c4500841f17 --- /dev/null +++ b/test/Linker/ctors4.ll @@ -0,0 +1,14 @@ +; RUN: llvm-link -S %s -o - | FileCheck %s + +define void @f() { + ret void +} + +; We lazy link @v, which causes llvm.global_ctors to have the corresponding +; entry. +@v = linkonce global i8 42 + +@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }] + +; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* @v }] + -- 2.34.1