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-dir}/utils 12 13import sys 14sys.path.append(sys.argv[1]) 15from libcxx.header_information import ( 16 lit_header_restrictions, 17 lit_header_undeprecations, 18 public_headers, 19) 20 21for header in public_headers: 22 print( 23 f"""\ 24//--- {header}.compile.pass.cpp 25{lit_header_restrictions.get(header, '')} 26{lit_header_undeprecations.get(header, '')} 27 28#include <{header}> 29 30#ifndef _LIBCPP_VERSION 31# error <{header}> does not seem to define _LIBCPP_VERSION 32#endif 33""" 34 ) 35