18 lines · plain
1## We're intentionally testing fatal errors (for malformed input files), and2## fatal errors aren't supported for testing when main is run twice.3# XFAIL: main-run-twice4 5# REQUIRES: x866# RUN: echo "!<arch>" > %t.a7# RUN: echo "foo" >> %t.a8# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o9 10# RUN: not %lld %t.o %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s11# RUN: not %lld %t.o -force_load %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s12# RUN: not %lld %t.o -ObjC %t.a -o /dev/null 2>&1 | FileCheck -DFILE=%t.a %s13# CHECK: error: [[FILE]]: failed to parse archive: truncated or malformed archive (remaining size of archive too small for next archive member header at offset 8)14 15.global _main16_main:17 ret18