| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // This test greps for %t, which is expanded to a path with backslashes. When |
| 10 | // that is passed to grep, those backslashes must be escaped. We escape those |
| 11 | // within the pattern into a file and use this file with 'grep'. |
| 12 | |
| 13 | // Make sure that substitutions are performed inside additional compiler flags. |
| 14 | |
| 15 | // ADDITIONAL_COMPILE_FLAGS: -I %t.1 |
| 16 | // ADDITIONAL_COMPILE_FLAGS: -isystem %t.2 -isysroot %t.3 |
| 17 | // RUN: echo "-I %t.1 -isystem %t.2 -isysroot %t.3" | sed "s/\\\/\\\\\\\/g" > %t.escaped.grep |
| 18 | // RUN: echo "%{compile_flags}" | grep -e -f %t.escaped.grep |
| 19 | |