From d3c3235ab39351d6d8cbb984776fe9ee0fd46846 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 5 Dec 2014 00:02:42 +0000 Subject: [PATCH] Add a few extra cases to the test. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223417 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Linker/Inputs/alignment.ll | 13 ++++++++++++- test/Linker/alignment.ll | 22 ++++++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/test/Linker/Inputs/alignment.ll b/test/Linker/Inputs/alignment.ll index d4093cdb0da..337cb8e5a16 100644 --- a/test/Linker/Inputs/alignment.ll +++ b/test/Linker/Inputs/alignment.ll @@ -1 +1,12 @@ -@X = global i32 7, align 8 +@A = global i32 7, align 8 +@B = global i32 7, align 4 + +define void @C() align 8 { + ret void +} + +define void @D() align 4 { + ret void +} + +@E = common global i32 0, align 8 diff --git a/test/Linker/alignment.ll b/test/Linker/alignment.ll index 364ad711be8..16cfe625fdc 100644 --- a/test/Linker/alignment.ll +++ b/test/Linker/alignment.ll @@ -1,8 +1,22 @@ -; The linker should choose the largest alignment when linking. - ; RUN: llvm-link %p/alignment.ll %p/Inputs/alignment.ll -S | FileCheck %s ; RUN: llvm-link %p/Inputs/alignment.ll %p/alignment.ll -S | FileCheck %s -; CHECK: @X = global i32 7, align 8 -@X = weak global i32 7, align 4 +@A = weak global i32 7, align 4 +; CHECK-DAG: @A = global i32 7, align 8 + +@B = weak global i32 7, align 8 +; CHECK-DAG: @B = global i32 7, align 4 + +define weak void @C() align 4 { + ret void +} +; CHECK-DAG: define void @C() align 8 { + +define weak void @D() align 8 { + ret void +} +; CHECK-DAG: define void @D() align 4 { + +@E = common global i32 0, align 4 +; CHECK-DAG: @E = common global i32 0, align 8 -- 2.34.1