brintos

brintos / llvm-project-archived public Read only

0
0
Text · 734 B · c0c6ffd Raw
26 lines · plain
1; REQUIRES: asserts2 3; RUN: llvm-as -o %t.bc %s4 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.bc8; RUN: FileCheck --input-file=%t2.stats %s9 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 1020}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 -DMSG=%errc_ENOENT --check-prefix=ERROR %s25; ERROR: LLVM gold plugin: [[MSG]]26