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
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
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"
15 ;; Make sure the metadata correlates to the .llvm.lto section.
16 ; CHECK: !llvm.embedded.objects = !{!1}
18 ; CHECK: !{ptr @llvm.embedded.object, !".llvm.lto"}