llvm.org GIT mirror llvm / d221469
Verify that attributes are not lost during linking. We don't want to lose attributes when a function decl without them is merged with a function decl that has them. PR2382 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200030 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 6 years ago
2 changed file(s) with 22 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-link %s %p/func-attrs-b.ll -S -o - | FileCheck %s
1 ; PR2382
2
3 ; CHECK: call void @check0(%struct.S0* sret null, %struct.S0* byval align 4 null, %struct.S0* align 4 null, %struct.S0* byval align 4 null)
4 ; CHECK: define void @check0(%struct.S0* sret %agg.result, %struct.S0* byval %arg0, %struct.S0* %arg1, %struct.S0* byval %arg2)
5
6 %struct.S0 = type <{ i8, i8, i8, i8 }>
7
8 define void @a() {
9 call void @check0(%struct.S0* sret null, %struct.S0* byval align 4 null, %struct.S0* align 4 null, %struct.S0* byval align 4 null)
10 ret void
11 }
12
13 declare void @check0(%struct.S0*, %struct.S0*, %struct.S0*, %struct.S0*)
0 ; This file is used with func-attrs-a.ll
1 ; RUN: true
2
3 %struct.S0 = type <{ i8, i8, i8, i8 }>
4
5 define void @check0(%struct.S0* sret %agg.result, %struct.S0* byval %arg0, %struct.S0* %arg1, %struct.S0* byval %arg2) {
6 ret void
7 }