3 ; RUN: opt -module-hash -module-summary %s -o %t.o
4 ; RUN: ld.lld --plugin-opt=emit-llvm -o %t.out.o %t.o
5 ; RUN: llvm-dis < %t.out.o -o - | FileCheck %s
7 ;; Regression test for D112297: bitcode writer used to crash when
8 ;; --plugin-opt=emit-llvmis enabled and the output is /dev/null.
9 ; RUN: ld.lld --plugin-opt=emit-llvm -mllvm -bitcode-flush-threshold=0 -o /dev/null %t.o
10 ; RUN: ld.lld --lto-emit-llvm -mllvm -bitcode-flush-threshold=0 -o /dev/null %t.o
12 ; CHECK: define hidden void @main()
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
15 target triple = "x86_64-unknown-linux-gnu"
17 @llvm.compiler.used = appending global [1 x ptr] [ptr @main], section "llvm.metadata"
19 define hidden void @main() {