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# Test that all headers define the _LIBCPP_VERSION macro. 10 11# RUN: %{python} %s %{libcxx}/utils 12 13import sys 14sys.path.append(sys.argv[1]) 15from libcxx.header_information import lit_header_restrictions, public_headers 16 17for header in public_headers: 18 print(f"""\ 19//--- {header}.compile.pass.cpp 20{lit_header_restrictions.get(header, '')} 21 22#include <{header}> 23 24#ifndef _LIBCPP_VERSION 25# error <{header}> does not seem to define _LIBCPP_VERSION 26#endif 27""") 28