@@ -50,24 +50,43 @@ template <class Size_T> class SmallVectorBase {
50
50
Size_T Size = 0 , Capacity;
51
51
52
52
// / The maximum value of the Size_T used.
53
+ #if !defined(_WIN32)
54
+ __attribute__ ((__visibility__(" hidden" )))
55
+ #endif
53
56
static constexpr size_t SizeTypeMax () {
54
57
return std::numeric_limits<Size_T>::max ();
55
58
}
56
59
57
60
SmallVectorBase () = delete;
61
+ #if !defined(_WIN32)
62
+ __attribute__ ((__visibility__(" hidden" )))
63
+ #endif
58
64
SmallVectorBase (void *FirstEl, size_t TotalCapacity)
59
65
: BeginX(FirstEl), Capacity(TotalCapacity) {}
60
66
61
67
// / This is an implementation of the grow() method which only works
62
68
// / on POD-like data types and is out of line to reduce code duplication.
63
69
// / This function will report a fatal error if it cannot increase capacity.
70
+ #if !defined(_WIN32)
71
+ __attribute__ ((__visibility__(" hidden" )))
72
+ #endif
64
73
void grow_pod (void *FirstEl, size_t MinCapacity, size_t TSize);
65
74
66
75
public:
76
+ #if !defined(_WIN32)
77
+ __attribute__ ((__visibility__(" hidden" )))
78
+ #endif
67
79
size_t size () const { return Size; }
80
+ #if !defined(_WIN32)
81
+ __attribute__ ((__visibility__(" hidden" )))
82
+ #endif
68
83
size_t capacity () const { return Capacity; }
69
84
70
- LLVM_NODISCARD bool empty () const { return !Size; }
85
+ LLVM_NODISCARD
86
+ #if !defined(_WIN32)
87
+ __attribute__ ((__visibility__(" hidden" )))
88
+ #endif
89
+ bool empty () const { return !Size; }
71
90
72
91
// / Set the array size to \p N, which the current array must have enough
73
92
// / capacity for.
@@ -78,6 +97,9 @@ template <class Size_T> class SmallVectorBase {
78
97
// / of the buffer when they know that more elements are available, and only
79
98
// / update the size later. This avoids the cost of value initializing elements
80
99
// / which will only be overwritten.
100
+ #if !defined(_WIN32)
101
+ __attribute__ ((__visibility__(" hidden" )))
102
+ #endif
81
103
void set_size (size_t N) {
82
104
assert (N <= capacity ());
83
105
Size = N;
0 commit comments