forked from OSchip/llvm-project
[libc++/libc++abi] Properly delimit lit substitutions
lit is not very clever when it performs substitution on RUN lines. It simply looks for a match anywhere in the line (without tokenization) and replaces it by the expansion. This means that a RUN line containing e.g. `-verify-ignore-unexpected=note` wouod be expanded to `-verify-ignore-unexpected=<substitution for not>e`, which is surprising and nonsensical. It also means that something like `%compile_module` could be expanded to `<substitution-for-%compile>_module` or to the correct substitution, depending on the order in which substitutions are evaluated by lit. To avoid such problems, it is a good habit to delimit custom substitutions with some token. This commit does that for all substitutions used in the libc++ and libc++abi test suites.
This commit is contained in:
parent
848112cca4
commit
08776defa5
|
@ -8,8 +8,8 @@
|
||||||
//
|
//
|
||||||
// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
|
// UNSUPPORTED: libcpp-has-no-threads, c++98, c++03
|
||||||
// REQUIRES: libatomic
|
// REQUIRES: libatomic
|
||||||
// RUN: %build -latomic
|
// RUN: %{build} -latomic
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
//
|
//
|
||||||
// GCC currently fails because it needs -fabi-version=6 to fix mangling of
|
// GCC currently fails because it needs -fabi-version=6 to fix mangling of
|
||||||
// std::atomic when used with __attribute__((vector(X))).
|
// std::atomic when used with __attribute__((vector(X))).
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %build -fno-exceptions
|
// RUN: %{build} -fno-exceptions
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
// UNSUPPORTED: c++98, c++03
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %compile -fsyntax-only
|
// RUN: %{compile} -fsyntax-only
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
// Test that we can include each header in two TU's and link them together.
|
// Test that we can include each header in two TU's and link them together.
|
||||||
|
|
||||||
// RUN: %cxx -c %s -o %t.first.o %flags %compile_flags
|
// RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags}
|
||||||
// RUN: %cxx -c %s -o %t.second.o -DWITH_MAIN %flags %compile_flags
|
// RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags}
|
||||||
// RUN: %cxx -o %t.exe %t.first.o %t.second.o %flags %link_flags
|
// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags}
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
|
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
|
||||||
#if defined(__DEPRECATED)
|
#if defined(__DEPRECATED)
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
// REQUIRES: fcoroutines-ts
|
// REQUIRES: fcoroutines-ts
|
||||||
|
|
||||||
// RUN: %build -fcoroutines-ts
|
// RUN: %{build} -fcoroutines-ts
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
// A simple "breathing" test that checks that <experimental/coroutine>
|
// A simple "breathing" test that checks that <experimental/coroutine>
|
||||||
// can be parsed and used in all dialects, including C++03 in order to match
|
// can be parsed and used in all dialects, including C++03 in order to match
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
// UNSUPPORTED: c++98, c++03, c++11
|
// UNSUPPORTED: c++98, c++03, c++11
|
||||||
// REQUIRES: fcoroutines-ts
|
// REQUIRES: fcoroutines-ts
|
||||||
|
|
||||||
// RUN: %build -fcoroutines-ts
|
// RUN: %{build} -fcoroutines-ts
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <experimental/coroutine>
|
#include <experimental/coroutine>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// NOTE: It's not common or recommended to have libc++ in the header search
|
// NOTE: It's not common or recommended to have libc++ in the header search
|
||||||
// path when compiling C files, but it does happen often enough.
|
// path when compiling C files, but it does happen often enough.
|
||||||
|
|
||||||
// RUN: %cxx -c -xc %s -fsyntax-only %flags %compile_flags -std=c99
|
// RUN: %{cxx} -c -xc %s -fsyntax-only %{flags} %{compile_flags} -std=c99
|
||||||
|
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
// class directory_entry
|
// class directory_entry
|
||||||
|
|
||||||
// RUN: %build -I%libcxx_src_root/src/filesystem
|
// RUN: %{build} -I%{libcxx_src_root}/src/filesystem
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include "filesystem_include.h"
|
#include "filesystem_include.h"
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
// typedef TrivialClock file_time_type;
|
// typedef TrivialClock file_time_type;
|
||||||
|
|
||||||
// RUN: %build -I%libcxx_src_root/src/filesystem
|
// RUN: %{build} -I%{libcxx_src_root}/src/filesystem
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
|
@ -39,14 +39,14 @@
|
||||||
// GCC doesn't support the aligned-allocation flags.
|
// GCC doesn't support the aligned-allocation flags.
|
||||||
// XFAIL: gcc
|
// XFAIL: gcc
|
||||||
|
|
||||||
// RUN: %build -faligned-allocation -fsized-deallocation
|
// RUN: %{build} -faligned-allocation -fsized-deallocation
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
// RUN: %build -faligned-allocation -fno-sized-deallocation -DNO_SIZE
|
// RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
// RUN: %build -fno-aligned-allocation -fsized-deallocation -DNO_ALIGN
|
// RUN: %{build} -fno-aligned-allocation -fsized-deallocation -DNO_ALIGN
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
// RUN: %build -fno-aligned-allocation -fno-sized-deallocation -DNO_ALIGN -DNO_SIZE
|
// RUN: %{build} -fno-aligned-allocation -fno-sized-deallocation -DNO_ALIGN -DNO_SIZE
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
// XFAIL: with_system_cxx_lib=macosx10.8
|
// XFAIL: with_system_cxx_lib=macosx10.8
|
||||||
// XFAIL: with_system_cxx_lib=macosx10.7
|
// XFAIL: with_system_cxx_lib=macosx10.7
|
||||||
|
|
||||||
// RUN: %build -faligned-allocation
|
// RUN: %{build} -faligned-allocation
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
// Test that we can include each header in two TU's and link them together.
|
// Test that we can include each header in two TU's and link them together.
|
||||||
|
|
||||||
// RUN: %compile -fsyntax-only
|
// RUN: %{compile} -fsyntax-only
|
||||||
|
|
||||||
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
|
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
|
||||||
#if defined(__DEPRECATED)
|
#if defined(__DEPRECATED)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// Test that <cinttypes> re-exports <cstdint>
|
// Test that <cinttypes> re-exports <cstdint>
|
||||||
|
|
||||||
// RUN: %build_module
|
// RUN: %{build_module}
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
// REQUIRES: modules-support
|
// REQUIRES: modules-support
|
||||||
// UNSUPPORTED: c++98, c++03
|
// UNSUPPORTED: c++98, c++03
|
||||||
|
|
||||||
// RUN: %build_module
|
// RUN: %{build_module}
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// Test that <cstdint> re-exports <stdint.h>
|
// Test that <cstdint> re-exports <stdint.h>
|
||||||
|
|
||||||
// RUN: %build_module
|
// RUN: %{build_module}
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
// Test that intypes.h re-exports stdint.h
|
// Test that intypes.h re-exports stdint.h
|
||||||
|
|
||||||
// RUN: %build_module
|
// RUN: %{build_module}
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
// Test that int8_t and the like are exported from stdint.h not inttypes.h
|
// Test that int8_t and the like are exported from stdint.h not inttypes.h
|
||||||
|
|
||||||
// RUN: %build_module
|
// RUN: %{build_module}
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
// REQUIRES: modules-support
|
// REQUIRES: modules-support
|
||||||
|
|
||||||
// NOTE: The -std=XXX flag is present in %flags, so we overwrite it by passing it after %flags.
|
// NOTE: The -std=XXX flag is present in %{flags}, so we overwrite it by passing it after %{flags}.
|
||||||
// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++98 %s
|
// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++98 %s
|
||||||
// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++03 %s
|
// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++03 %s
|
||||||
// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++11 %s
|
// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++11 %s
|
||||||
// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++14 %s
|
// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++14 %s
|
||||||
// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++17 %s
|
// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++17 %s
|
||||||
// RUN: %cxx %flags %compile_flags -fmodules -fcxx-modules -fsyntax-only -std=c++2a %s
|
// RUN: %{cxx} %{flags} %{compile_flags} -fmodules -fcxx-modules -fsyntax-only -std=c++2a %s
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
// Ensure that none of the standard C++ headers implicitly include cassert or
|
// Ensure that none of the standard C++ headers implicitly include cassert or
|
||||||
// assert.h (because assert() is implemented as a macro).
|
// assert.h (because assert() is implemented as a macro).
|
||||||
|
|
||||||
// RUN: %compile -fsyntax-only
|
// RUN: %{compile} -fsyntax-only
|
||||||
|
|
||||||
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
|
// Prevent <ext/hash_map> from generating deprecated warnings for this test.
|
||||||
#if defined(__DEPRECATED)
|
#if defined(__DEPRECATED)
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
// REQUIRES: fdelayed-template-parsing
|
// REQUIRES: fdelayed-template-parsing
|
||||||
|
|
||||||
// RUN: %build -fdelayed-template-parsing
|
// RUN: %{build} -fdelayed-template-parsing
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %build
|
// RUN: %{build}
|
||||||
// RUN: %exec %t.exe "HELLO"
|
// RUN: %{exec} %t.exe "HELLO"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %build
|
// RUN: %{build}
|
||||||
// RUN: not %run
|
// RUN: %{not} %{run}
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %build
|
// RUN: %{build}
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
// Regression test for PR42676.
|
// Regression test for PR42676.
|
||||||
|
|
||||||
// RUN: %cxx %flags %s -o %t.exe %compile_flags %link_flags -D_LIBCPP_HIDE_FROM_ABI_PER_TU
|
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} %{link_flags} -D_LIBCPP_HIDE_FROM_ABI_PER_TU
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -13,10 +13,10 @@
|
||||||
// This tests is meant to demonstrate an existing ABI bug between the
|
// This tests is meant to demonstrate an existing ABI bug between the
|
||||||
// C++03 and C++11 implementations of std::function. It is not a real test.
|
// C++03 and C++11 implementations of std::function. It is not a real test.
|
||||||
|
|
||||||
// RUN: %cxx -c %s -o %t.first.o %flags %compile_flags -std=c++03 -g
|
// RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags} -std=c++03 -g
|
||||||
// RUN: %cxx -c %s -o %t.second.o -DWITH_MAIN %flags %compile_flags -g -std=c++11
|
// RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags} -g -std=c++11
|
||||||
// RUN: %cxx -o %t.exe %t.first.o %t.second.o %flags %link_flags -g
|
// RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags} -g
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
// std::_IsSame: 689.634 ms 356 K
|
// std::_IsSame: 689.634 ms 356 K
|
||||||
// std::is_same: 8,129.180 ms 560 K
|
// std::is_same: 8,129.180 ms 560 K
|
||||||
//
|
//
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %S/orig.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/orig.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_NEW
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_NEW
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
// __and_: 14,181.851 ms 648 M
|
// __and_: 14,181.851 ms 648 M
|
||||||
//
|
//
|
||||||
|
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/new.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %S/lazy.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_LAZY_AND
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/lazy.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_LAZY_AND
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %S/std.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_STD_AND
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %S/std.o -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -std=c++17 -DTEST_STD_AND
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
@ -24,13 +24,13 @@
|
||||||
// variant_new: 1,105 ms 828 KiB
|
// variant_new: 1,105 ms 828 KiB
|
||||||
|
|
||||||
|
|
||||||
// RUN: %cxx %flags %compile_flags -std=c++17 -c %s \
|
// RUN: %{cxx} %{flags} %{compile_flags} -std=c++17 -c %s \
|
||||||
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
|
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
|
||||||
// RUN: -DTEST_NS=flat_impl -o %S/flat.o
|
// RUN: -DTEST_NS=flat_impl -o %S/flat.o
|
||||||
// RUN: %cxx %flags %compile_flags -std=c++17 -c %s \
|
// RUN: %{cxx} %{flags} %{compile_flags} -std=c++17 -c %s \
|
||||||
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
|
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
|
||||||
// RUN: -DTEST_NS=rec_impl -o %S/rec.o
|
// RUN: -DTEST_NS=rec_impl -o %S/rec.o
|
||||||
// RUN: %cxx %flags %compile_flags -std=c++17 -c %s \
|
// RUN: %{cxx} %{flags} %{compile_flags} -std=c++17 -c %s \
|
||||||
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
|
// RUN: -ggdb -ggnu-pubnames -ftemplate-depth=5000 -ftime-trace -g \
|
||||||
// RUN: -DTEST_NS=variant_impl -o %S/variant.o
|
// RUN: -DTEST_NS=variant_impl -o %S/variant.o
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
// UNSUPPORTED: system-windows
|
// UNSUPPORTED: system-windows
|
||||||
// REQUIRES: libcxx_gdb
|
// REQUIRES: libcxx_gdb
|
||||||
//
|
//
|
||||||
// RUN: %cxx %flags %s -o %t.exe %compile_flags -g %link_flags
|
// RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} -g %{link_flags}
|
||||||
// Ensure locale-independence for unicode tests.
|
// Ensure locale-independence for unicode tests.
|
||||||
// RUN: %libcxx_gdb -nx -batch -iex "set autoload off" -ex "source %libcxx_src_root/utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %libcxx_src_root/test/pretty_printers/gdb_pretty_printer_test.py" %t.exe
|
// RUN: %{libcxx_gdb} -nx -batch -iex "set autoload off" -ex "source %{libcxx_src_root}/utils/gdb/libcxx/printers.py" -ex "python register_libcxx_printer_loader()" -ex "source %{libcxx_src_root}/test/pretty_printers/gdb_pretty_printer_test.py" %t.exe
|
||||||
|
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
// RUN: %build -O2
|
// RUN: %{build} -O2
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
// <map>
|
// <map>
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
// _STD_TYPES_T, stdint.h can be entered to get to macros like UINT32_MAX.
|
// _STD_TYPES_T, stdint.h can be entered to get to macros like UINT32_MAX.
|
||||||
//
|
//
|
||||||
// REQUIRES: aix
|
// REQUIRES: aix
|
||||||
// RUN: %compile -c
|
// RUN: %{compile} -c
|
||||||
// RUN: %compile -c -D_XOPEN_SOURCE=700
|
// RUN: %{compile} -c -D_XOPEN_SOURCE=700
|
||||||
|
|
||||||
// test <stdint.h>
|
// test <stdint.h>
|
||||||
//
|
//
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
||||||
|
|
||||||
// REQUIRES: -faligned-allocation
|
// REQUIRES: -faligned-allocation
|
||||||
// RUN: %compile %verify -faligned-allocation
|
// RUN: %{compile} %{verify} -faligned-allocation
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
||||||
|
|
||||||
// REQUIRES: -faligned-allocation
|
// REQUIRES: -faligned-allocation
|
||||||
// RUN: %compile %verify -faligned-allocation
|
// RUN: %{compile} %{verify} -faligned-allocation
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
||||||
|
|
||||||
// REQUIRES: -faligned-allocation
|
// REQUIRES: -faligned-allocation
|
||||||
// RUN: %compile %verify -faligned-allocation
|
// RUN: %{compile} %{verify} -faligned-allocation
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
||||||
|
|
||||||
// REQUIRES: -faligned-allocation
|
// REQUIRES: -faligned-allocation
|
||||||
// RUN: %compile %verify -faligned-allocation
|
// RUN: %{compile} %{verify} -faligned-allocation
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
|
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
|
||||||
// REQUIRES: -fsized-deallocation
|
// REQUIRES: -fsized-deallocation
|
||||||
|
|
||||||
// RUN: %build -fsized-deallocation
|
// RUN: %{build} -fsized-deallocation
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#if !defined(__cpp_sized_deallocation)
|
#if !defined(__cpp_sized_deallocation)
|
||||||
# error __cpp_sized_deallocation should be defined
|
# error __cpp_sized_deallocation should be defined
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
||||||
|
|
||||||
// REQUIRES: -faligned-allocation
|
// REQUIRES: -faligned-allocation
|
||||||
// RUN: %compile %verify -faligned-allocation
|
// RUN: %{compile} %{verify} -faligned-allocation
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
// UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8
|
||||||
|
|
||||||
// REQUIRES: -faligned-allocation
|
// REQUIRES: -faligned-allocation
|
||||||
// RUN: %compile %verify -faligned-allocation
|
// RUN: %{compile} %{verify} -faligned-allocation
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
|
// NOTE: Only clang-3.7 and GCC 5.1 and greater support -fsized-deallocation.
|
||||||
// REQUIRES: -fsized-deallocation
|
// REQUIRES: -fsized-deallocation
|
||||||
|
|
||||||
// RUN: %build -fsized-deallocation -O3
|
// RUN: %{build} -fsized-deallocation -O3
|
||||||
// RUN: %run
|
// RUN: %{run}
|
||||||
|
|
||||||
#if !defined(__cpp_sized_deallocation)
|
#if !defined(__cpp_sized_deallocation)
|
||||||
# error __cpp_sized_deallocation should be defined
|
# error __cpp_sized_deallocation should be defined
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
|
|
||||||
// class condition_variable_any;
|
// class condition_variable_any;
|
||||||
|
|
||||||
// RUN: %build
|
// RUN: %{build}
|
||||||
// RUN: %run 1
|
// RUN: %{run} 1
|
||||||
// RUN: %run 2
|
// RUN: %{run} 2
|
||||||
// RUN: %run 3
|
// RUN: %{run} 3
|
||||||
// RUN: %run 4
|
// RUN: %{run} 4
|
||||||
// RUN: %run 5
|
// RUN: %{run} 5
|
||||||
// RUN: %run 6
|
// RUN: %{run} 6
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Overview
|
// Overview
|
||||||
|
|
|
@ -1044,30 +1044,30 @@ class Configuration(object):
|
||||||
sub = self.config.substitutions
|
sub = self.config.substitutions
|
||||||
cxx_path = tool_env + pipes.quote(self.cxx.path)
|
cxx_path = tool_env + pipes.quote(self.cxx.path)
|
||||||
# Configure compiler substitutions
|
# Configure compiler substitutions
|
||||||
sub.append(('%cxx', cxx_path))
|
sub.append(('%{cxx}', cxx_path))
|
||||||
sub.append(('%libcxx_src_root', self.libcxx_src_root))
|
sub.append(('%{libcxx_src_root}', self.libcxx_src_root))
|
||||||
# Configure flags substitutions
|
# Configure flags substitutions
|
||||||
flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])
|
flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])
|
||||||
compile_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.compile_flags])
|
compile_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.compile_flags])
|
||||||
link_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.link_flags])
|
link_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.link_flags])
|
||||||
all_flags = '%s %s %s' % (flags_str, compile_flags_str, link_flags_str)
|
all_flags = '%s %s %s' % (flags_str, compile_flags_str, link_flags_str)
|
||||||
sub.append(('%flags', flags_str))
|
sub.append(('%{flags}', flags_str))
|
||||||
sub.append(('%compile_flags', compile_flags_str))
|
sub.append(('%{compile_flags}', compile_flags_str))
|
||||||
sub.append(('%link_flags', link_flags_str))
|
sub.append(('%{link_flags}', link_flags_str))
|
||||||
if self.cxx.isVerifySupported():
|
if self.cxx.isVerifySupported():
|
||||||
verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '
|
verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '
|
||||||
sub.append(('%verify', verify_str))
|
sub.append(('%{verify}', verify_str))
|
||||||
# Add compile and link shortcuts
|
# Add compile and link shortcuts
|
||||||
compile_str = (cxx_path + ' -o %t.o %s -c ' + flags_str
|
compile_str = (cxx_path + ' -o %t.o %s -c ' + flags_str
|
||||||
+ ' ' + compile_flags_str)
|
+ ' ' + compile_flags_str)
|
||||||
build_str = cxx_path + ' -o %t.exe %s ' + all_flags
|
build_str = cxx_path + ' -o %t.exe %s ' + all_flags
|
||||||
if self.cxx.use_modules:
|
if self.cxx.use_modules:
|
||||||
sub.append(('%build_module', build_str))
|
sub.append(('%{build_module}', build_str))
|
||||||
elif self.cxx.modules_flags is not None:
|
elif self.cxx.modules_flags is not None:
|
||||||
modules_str = ' '.join(self.cxx.modules_flags) + ' '
|
modules_str = ' '.join(self.cxx.modules_flags) + ' '
|
||||||
sub.append(('%build_module', build_str + ' ' + modules_str))
|
sub.append(('%{build_module}', build_str + ' ' + modules_str))
|
||||||
sub.append(('%compile', compile_str))
|
sub.append(('%{compile}', compile_str))
|
||||||
sub.append(('%build', build_str))
|
sub.append(('%{build}', build_str))
|
||||||
# Configure exec prefix substitutions.
|
# Configure exec prefix substitutions.
|
||||||
# Configure run env substitution.
|
# Configure run env substitution.
|
||||||
codesign_ident = self.get_lit_conf('llvm_codesign_identity', '')
|
codesign_ident = self.get_lit_conf('llvm_codesign_identity', '')
|
||||||
|
@ -1078,14 +1078,14 @@ class Configuration(object):
|
||||||
(pipes.quote(sys.executable), pipes.quote(run_py),
|
(pipes.quote(sys.executable), pipes.quote(run_py),
|
||||||
codesign_ident, env_vars)
|
codesign_ident, env_vars)
|
||||||
run_str = exec_str + '%t.exe'
|
run_str = exec_str + '%t.exe'
|
||||||
sub.append(('%exec', exec_str))
|
sub.append(('%{exec}', exec_str))
|
||||||
sub.append(('%run', run_str))
|
sub.append(('%{run}', run_str))
|
||||||
# Configure not program substitutions
|
# Configure not program substitutions
|
||||||
not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')
|
not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')
|
||||||
not_str = '%s %s ' % (pipes.quote(sys.executable), pipes.quote(not_py))
|
not_str = '%s %s ' % (pipes.quote(sys.executable), pipes.quote(not_py))
|
||||||
sub.append(('not ', not_str))
|
sub.append(('%{not} ', not_str))
|
||||||
if self.get_lit_conf('libcxx_gdb'):
|
if self.get_lit_conf('libcxx_gdb'):
|
||||||
sub.append(('%libcxx_gdb', self.get_lit_conf('libcxx_gdb')))
|
sub.append(('%{libcxx_gdb}', self.get_lit_conf('libcxx_gdb')))
|
||||||
|
|
||||||
def can_use_deployment(self):
|
def can_use_deployment(self):
|
||||||
# Check if the host is on an Apple platform using clang.
|
# Check if the host is on an Apple platform using clang.
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
// in the system libc++abi installation on OS X. (DYLD_LIBRARY_PATH is ignored
|
// in the system libc++abi installation on OS X. (DYLD_LIBRARY_PATH is ignored
|
||||||
// for shell tests because of Apple security features).
|
// for shell tests because of Apple security features).
|
||||||
|
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %t.one.o
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.one.o
|
||||||
// RUN: %cxx %flags %compile_flags -c %s -o %t.two.o -DTU_ONE
|
// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.two.o -DTU_ONE
|
||||||
// RUN: %cxx %flags %t.one.o %t.two.o -lc++abi %link_flags -o %t.exe
|
// RUN: %{cxx} %{flags} %t.one.o %t.two.o -lc++abi %{link_flags} -o %t.exe
|
||||||
// RUN: %t.exe
|
// RUN: %t.exe
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@ RUN: %cxx %flags %link_flags %s -o %t.exe
|
@ RUN: %{cxx} %{flags} %{link_flags} %s -o %t.exe
|
||||||
@ RUN: %t.exe
|
@ RUN: %t.exe
|
||||||
@ UNSUPPORTED: libcxxabi-no-exceptions
|
@ UNSUPPORTED: libcxxabi-no-exceptions
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@ RUN: %cxx %flags %link_flags %s -o %t.exe
|
@ RUN: %{cxx} %{flags} %{link_flags} %s -o %t.exe
|
||||||
@ RUN: %t.exe
|
@ RUN: %t.exe
|
||||||
@ UNSUPPORTED: libcxxabi-no-exceptions
|
@ UNSUPPORTED: libcxxabi-no-exceptions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue