1 // -*- C++ -*- 2 //===----------------------------------------------------------------------===// 3 // 4 // The LLVM Compiler Infrastructure 5 // 6 // This file is dual licensed under the MIT and the University of Illinois Open 7 // Source Licenses. See LICENSE.TXT for details. 8 // 9 //===----------------------------------------------------------------------===// 10 11 // Test that we can include each header in two TU's and link them together. 12 13 // RUN: %cxx -c %s -o %t.first.o %flags %compile_flags 14 // RUN: %cxx -c %s -o %t.second.o -DWITH_MAIN %flags %compile_flags 15 // RUN: %cxx -o %t.exe %t.first.o %t.second.o %flags %link_flags 16 // RUN: %run 17 18 19 // Prevent <ext/hash_map> from generating deprecated warnings for this test. 20 #if defined(__DEPRECATED) 21 #undef __DEPRECATED 22 #endif 23 24 #include <algorithm> 25 #include <array> 26 #include <bitset> 27 #include <cassert> 28 #include <ccomplex> 29 #include <cctype> 30 #include <cerrno> 31 #include <cfenv> 32 #include <cfloat> 33 #include <chrono> 34 #include <cinttypes> 35 #include <ciso646> 36 #include <climits> 37 #include <clocale> 38 #include <cmath> 39 #include <codecvt> 40 #include <complex> 41 #include <complex.h> 42 #include <condition_variable> 43 #include <csetjmp> 44 #include <csignal> 45 #include <cstdarg> 46 #include <cstdbool> 47 #include <cstddef> 48 #include <cstdint> 49 #include <cstdio> 50 #include <cstdlib> 51 #include <cstring> 52 #include <ctgmath> 53 #include <ctime> 54 #include <cwchar> 55 #include <cwctype> 56 #include <deque> 57 #include <exception> 58 #include <experimental/algorithm> 59 #include <experimental/any> 60 #include <experimental/chrono> 61 #include <experimental/dynarray> 62 #include <experimental/optional> 63 #include <experimental/string_view> 64 #include <experimental/system_error> 65 #include <experimental/type_traits> 66 #include <experimental/utility> 67 #include <ext/hash_map> 68 #include <ext/hash_set> 69 #include <forward_list> 70 #include <fstream> 71 #include <functional> 72 #include <initializer_list> 73 #include <iomanip> 74 #include <ios> 75 #include <iosfwd> 76 #include <iostream> 77 #include <istream> 78 #include <iterator> 79 #include <limits> 80 #include <list> 81 #include <locale> 82 #include <map> 83 #include <memory> 84 #include <new> 85 #include <numeric> 86 #include <ostream> 87 #include <queue> 88 #include <random> 89 #include <ratio> 90 #include <regex> 91 #include <scoped_allocator> 92 #include <set> 93 #include <sstream> 94 #include <stack> 95 #include <stdexcept> 96 #include <streambuf> 97 #include <string> 98 #include <strstream> 99 #include <system_error> 100 #include <tgmath.h> 101 #include <tuple> 102 #include <typeindex> 103 #include <typeinfo> 104 #include <type_traits> 105 #include <unordered_map> 106 #include <unordered_set> 107 #include <utility> 108 #include <valarray> 109 #include <vector> 110 111 #ifndef _LIBCPP_HAS_NO_THREADS 112 #include <atomic> 113 #include <future> 114 #include <mutex> 115 #include <shared_mutex> 116 #include <thread> 117 #endif 118 119 #if defined(WITH_MAIN) 120 int main() {} 121 #endif 122