summaryrefslogtreecommitdiffstats
path: root/libcxx/include/ios
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2018-07-11 23:14:33 +0000
committerLouis Dionne <ldionne@apple.com>2018-07-11 23:14:33 +0000
commitdc7200b486b6c5b5229abcee97c160145cc3d955 (patch)
treef4373ca956f1ba3ccf7bde5e1a396f9819472f60 /libcxx/include/ios
parent62c76db4eec8ef64a03c4b077045893bebfc38e9 (diff)
downloadbcm5719-llvm-dc7200b486b6c5b5229abcee97c160145cc3d955.tar.gz
bcm5719-llvm-dc7200b486b6c5b5229abcee97c160145cc3d955.zip
[libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary: We never actually mean to always inline a function -- all the uses of the macro I could find are actually attempts to control the visibility of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which is actually always defined the same. This change is orthogonal to the decision of what we're actually going to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by having one canonical way of doing things. Note that this commit had originally been applied in r336369 and then reverted in r336382 because of unforeseen problems. Both of these problems have now been fixed. Reviewers: EricWF, mclow.lists Subscribers: christof, dexonsmith, erikvanderpoel Differential Revision: https://reviews.llvm.org/D48892 llvm-svn: 336866
Diffstat (limited to 'libcxx/include/ios')
-rw-r--r--libcxx/include/ios34
1 files changed, 17 insertions, 17 deletions
diff --git a/libcxx/include/ios b/libcxx/include/ios
index 6e32d0fe6b7..040b2d4e04f 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -337,9 +337,9 @@ protected:
}
void init(void* __sb);
- _LIBCPP_ALWAYS_INLINE void* rdbuf() const {return __rdbuf_;}
+ _LIBCPP_INLINE_VISIBILITY void* rdbuf() const {return __rdbuf_;}
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
void rdbuf(void* __sb)
{
__rdbuf_ = __sb;
@@ -351,7 +351,7 @@ protected:
void move(ios_base&);
void swap(ios_base&) _NOEXCEPT;
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
void set_rdbuf(void* __sb)
{
__rdbuf_ = __sb;
@@ -599,26 +599,26 @@ public:
// we give it internal linkage.
#if defined(_LIBCPP_CXX03_LANG)
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
operator __cxx03_bool::__bool_type() const {
return !fail() ? &__cxx03_bool::__true_value : nullptr;
}
#else
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
_LIBCPP_EXPLICIT operator bool() const {return !fail();}
#endif
- _LIBCPP_ALWAYS_INLINE bool operator!() const {return fail();}
- _LIBCPP_ALWAYS_INLINE iostate rdstate() const {return ios_base::rdstate();}
- _LIBCPP_ALWAYS_INLINE void clear(iostate __state = goodbit) {ios_base::clear(__state);}
- _LIBCPP_ALWAYS_INLINE void setstate(iostate __state) {ios_base::setstate(__state);}
- _LIBCPP_ALWAYS_INLINE bool good() const {return ios_base::good();}
- _LIBCPP_ALWAYS_INLINE bool eof() const {return ios_base::eof();}
- _LIBCPP_ALWAYS_INLINE bool fail() const {return ios_base::fail();}
- _LIBCPP_ALWAYS_INLINE bool bad() const {return ios_base::bad();}
+ _LIBCPP_INLINE_VISIBILITY bool operator!() const {return fail();}
+ _LIBCPP_INLINE_VISIBILITY iostate rdstate() const {return ios_base::rdstate();}
+ _LIBCPP_INLINE_VISIBILITY void clear(iostate __state = goodbit) {ios_base::clear(__state);}
+ _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);}
+ _LIBCPP_INLINE_VISIBILITY bool good() const {return ios_base::good();}
+ _LIBCPP_INLINE_VISIBILITY bool eof() const {return ios_base::eof();}
+ _LIBCPP_INLINE_VISIBILITY bool fail() const {return ios_base::fail();}
+ _LIBCPP_INLINE_VISIBILITY bool bad() const {return ios_base::bad();}
- _LIBCPP_ALWAYS_INLINE iostate exceptions() const {return ios_base::exceptions();}
- _LIBCPP_ALWAYS_INLINE void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
+ _LIBCPP_INLINE_VISIBILITY iostate exceptions() const {return ios_base::exceptions();}
+ _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
// 27.5.4.1 Constructor/destructor:
_LIBCPP_INLINE_VISIBILITY
@@ -652,7 +652,7 @@ public:
char_type widen(char __c) const;
protected:
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
basic_ios() {// purposefully does no initialization
}
_LIBCPP_INLINE_VISIBILITY
@@ -661,7 +661,7 @@ protected:
_LIBCPP_INLINE_VISIBILITY
void move(basic_ios& __rhs);
#ifndef _LIBCPP_CXX03_LANG
- _LIBCPP_ALWAYS_INLINE
+ _LIBCPP_INLINE_VISIBILITY
void move(basic_ios&& __rhs) {move(__rhs);}
#endif
_LIBCPP_INLINE_VISIBILITY
OpenPOWER on IntegriCloud