1; REQUIRES: x86 2 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 6 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 11 12; CHECK: define hidden void @main() 13 14target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 15target triple = "x86_64-unknown-linux-gnu" 16 17@llvm.compiler.used = appending global [1 x ptr] [ptr @main], section "llvm.metadata" 18 19define hidden void @main() { 20 ret void 21} 22