llvm-project
35 строк · 954.0 Байт
1; REQUIRES: x86
2; RUN: rm -rf %t; split-file %s %t
3; RUN: llvm-as -o %t/first.bc %t/first.ll
4; RUN: llvm-as -o %t/second.bc %t/second.ll
5; RUN: %no-fatal-warnings-lld -dylib %t/first.bc %t/second.bc -o /dev/null 2>&1 | FileCheck %s
6
7;; FIXME: can we replace ld-temp.o with a proper name?
8; CHECK: warning: linking module flags 'foo': IDs have conflicting values ('i32 2' from {{.*}}second.bc with 'i32 1' from ld-temp.o)
9
10;--- first.ll
11target triple = "x86_64-apple-macosx10.15.0"
12target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
13
14declare void @f()
15
16define void @g() {
17call void @f()
18ret void
19}
20
21!0 = !{ i32 2, !"foo", i32 1 }
22
23!llvm.module.flags = !{ !0 }
24
25;--- second.ll
26target triple = "x86_64-apple-macosx10.15.0"
27target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
28
29define void @f() {
30ret void
31}
32
33!0 = !{ i32 2, !"foo", i32 2 }
34
35!llvm.module.flags = !{ !0 }
36