# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o

# RUN: echo INCLUDE %t1.script > %t1.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s

# RUN: echo INCLUDE %t2.script > %t1.script
# RUN: echo INCLUDE %t1.script > %t2.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s

# CHECK: there is a cycle in linker script INCLUDEs

.globl _start
_start:
  ret

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o

# RUN: echo "INCLUDE \"%t1.script\"" > %t1.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s

# RUN: echo "INCLUDE \"%t2.script\"" > %t1.script
# RUN: echo "INCLUDE \"%t1.script\"" > %t2.script
# RUN: not ld.lld %t.o %t1.script 2>&1 | FileCheck %s

# CHECK: there is a cycle in linker script INCLUDEs

.globl _start
_start:
  ret

Fix issue with test when build path contains '@'
[ELF] Fix issue with test when build path contains '@'

'@' is a valid character in file paths, but the linker script tokenizer treats it
as a separate token. This was leading to an unexpected test failure, on our local
builds. This patch changes the test to quote the path to prevent this happening.

An alternative would have been to add '@' to the list of "unquoted tokens" in
ScriptLexer.cpp, but ld.bfd has the same behaviour as the current LLD.

Reviewers: ruiu

Differential Revision: https://reviews.llvm.org/D37689

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@312922 91177308-0d34-0410-b5e6-96231b3b80d8
