xref: /llvm-project/llvm/test/Transforms/EmbedBitcode/embed.ll (revision 9d476e1e1a18af390e3455a6622ee67a69c64103)
1; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode" -S | FileCheck %s
2; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode<thinlto>" -S | FileCheck %s
3; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode<emit-summary>" -S | FileCheck %s
4; RUN: opt --mtriple x86_64-unknown-linux-gnu < %s -passes="embed-bitcode<thinlto;emit-summary>" -S | FileCheck %s
5
6@a = global i32 1
7
8; CHECK: @a = global i32 1
9;; Make sure the module is in the correct section.
10; CHECK: @llvm.embedded.object = private constant {{.*}}, section ".llvm.lto", align 1
11
12;; Ensure that the metadata is in llvm.compiler.used.
13; CHECK: @llvm.compiler.used = appending global [1 x ptr] [ptr @llvm.embedded.object], section "llvm.metadata"
14
15;; Make sure the metadata correlates to the .llvm.lto section.
16; CHECK: !llvm.embedded.objects = !{!1}
17; CHECK: !0 = !{}
18; CHECK: !{ptr @llvm.embedded.object, !".llvm.lto"}
19