[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / early-exit-for-bad-paths.s
blob03462f51da03c5e671eb43b76322de52d13f08d2
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: not ld.lld %t.o -o does_not_exist/output 2>&1 | \
5 # RUN: FileCheck %s -check-prefixes=NO-DIR-OUTPUT,CHECK
6 # RUN: not ld.lld %t.o -o %s/dir_is_a_file 2>&1 | \
7 # RUN: FileCheck %s -check-prefixes=DIR-IS-OUTPUT,CHECK
9 # RUN: echo "OUTPUT(\"does_not_exist/output\")" > %t.script
10 # RUN: not ld.lld %t.o %t.script 2>&1 | \
11 # RUN: FileCheck %s -check-prefixes=NO-DIR-OUTPUT,CHECK
12 # RUN: echo "OUTPUT(\"%s/dir_is_a_file\")" > %t.script
13 # RUN: not ld.lld %t.o %t.script 2>&1 | \
14 # RUN: FileCheck %s -check-prefixes=DIR-IS-OUTPUT,CHECK
16 # RUN: not ld.lld %t.o -o %t -Map=does_not_exist/output 2>&1 | \
17 # RUN: FileCheck %s -check-prefixes=NO-DIR-MAP,CHECK
18 # RUN: not ld.lld %t.o -o %t -Map=%s/dir_is_a_file 2>&1 | \
19 # RUN: FileCheck %s -check-prefixes=DIR-IS-MAP,CHECK
21 # NO-DIR-OUTPUT: error: cannot open output file does_not_exist/output:
22 # DIR-IS-OUTPUT: error: cannot open output file {{.*}}/dir_is_a_file:
23 # NO-DIR-MAP: error: cannot open map file does_not_exist/output:
24 # DIR-IS-MAP: error: cannot open map file {{.*}}/dir_is_a_file:
26 # We should exit before doing the actual link. If an undefined symbol error is
27 # discovered we haven't bailed out early as expected.
28 # CHECK-NOT: undefined_symbol
30 # RUN: not ld.lld %t.o -o / 2>&1 | FileCheck %s -check-prefixes=ROOT,CHECK
31 # ROOT: error: cannot open output file /
33 .globl _start
34 _start:
35 call undefined_symbol