Coverage Report

Created: 2020-02-15 09:57

/Users/buildslave/jenkins/workspace/coverage/llvm-project/libcxx/src/algorithm.cpp
Line
Count
Source (jump to first uncovered line)
1
//===----------------------- algorithm.cpp --------------------------------===//
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
#include "algorithm"
10
#include "random"
11
#ifndef _LIBCPP_HAS_NO_THREADS
12
#include "mutex"
13
#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
14
#pragma comment(lib, "pthread")
15
#endif
16
#endif
17
18
_LIBCPP_BEGIN_NAMESPACE_STD
19
20
template void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
21
template void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
22
template void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
23
template void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
24
template void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
25
template void __sort<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
26
template void __sort<__less<int>&, int*>(int*, int*, __less<int>&);
27
template void __sort<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
28
template void __sort<__less<long>&, long*>(long*, long*, __less<long>&);
29
template void __sort<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
30
template void __sort<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
31
template void __sort<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
32
template void __sort<__less<float>&, float*>(float*, float*, __less<float>&);
33
template void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
34
template void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
35
36
template bool __insertion_sort_incomplete<__less<char>&, char*>(char*, char*, __less<char>&);
37
template bool __insertion_sort_incomplete<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
38
template bool __insertion_sort_incomplete<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
39
template bool __insertion_sort_incomplete<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
40
template bool __insertion_sort_incomplete<__less<short>&, short*>(short*, short*, __less<short>&);
41
template bool __insertion_sort_incomplete<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
42
template bool __insertion_sort_incomplete<__less<int>&, int*>(int*, int*, __less<int>&);
43
template bool __insertion_sort_incomplete<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
44
template bool __insertion_sort_incomplete<__less<long>&, long*>(long*, long*, __less<long>&);
45
template bool __insertion_sort_incomplete<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
46
template bool __insertion_sort_incomplete<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
47
template bool __insertion_sort_incomplete<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
48
template bool __insertion_sort_incomplete<__less<float>&, float*>(float*, float*, __less<float>&);
49
template bool __insertion_sort_incomplete<__less<double>&, double*>(double*, double*, __less<double>&);
50
template bool __insertion_sort_incomplete<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
51
52
template unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
53
54
#ifndef _LIBCPP_HAS_NO_THREADS
55
_LIBCPP_SAFE_STATIC static __libcpp_mutex_t __rs_mut = _LIBCPP_MUTEX_INITIALIZER;
56
#endif
57
unsigned __rs_default::__c_ = 0;
58
59
__rs_default::__rs_default()
60
0
{
61
0
#ifndef _LIBCPP_HAS_NO_THREADS
62
0
    __libcpp_mutex_lock(&__rs_mut);
63
0
#endif
64
0
    __c_ = 1;
65
0
}
66
67
__rs_default::__rs_default(const __rs_default&)
68
0
{
69
0
    ++__c_;
70
0
}
71
72
__rs_default::~__rs_default()
73
0
{
74
0
#ifndef _LIBCPP_HAS_NO_THREADS
75
0
    if (--__c_ == 0)
76
0
       __libcpp_mutex_unlock(&__rs_mut);
77
#else
78
    --__c_;
79
#endif
80
}
81
82
__rs_default::result_type
83
__rs_default::operator()()
84
0
{
85
0
    static mt19937 __rs_g;
86
0
    return __rs_g();
87
0
}
88
89
__rs_default
90
__rs_get()
91
0
{
92
0
    return __rs_default();
93
0
}
94
95
_LIBCPP_END_NAMESPACE_STD