1; REQUIRES: asserts 2 3; RUN: llvm-as -o %t.bc %s 4 5; Try to save statistics to file. 6; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=stats-file=%t2.stats \ 7; RUN: -m elf_x86_64 -r -o %t.o %t.bc 8; RUN: FileCheck --input-file=%t2.stats %s 9 10; CHECK: { 11; CHECK: "asm-printer.EmittedInsts": 12; CHECK: } 13 14 15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 16target triple = "x86_64-unknown-linux-gnu" 17 18define i32 @foo() { 19 ret i32 10 20} 21 22; Try to save statistics to an invalid file. 23; RUN: not %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=stats-file=%t2/foo.stats \ 24; RUN: -m elf_x86_64 -r -o %t.o %t.bc 2>&1 | FileCheck --check-prefix=ERROR %s 25; ERROR: LLVM gold plugin: No such file or directory 26