0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd: Various symbol internalizing and PLT reductions.

This commit is contained in:
Jason Volk 2022-06-14 14:15:53 -07:00
parent 2288e0d6fa
commit 4ae50c97d1
19 changed files with 120 additions and 46 deletions

View file

@ -136,7 +136,7 @@ struct ircd::exception
/// Remember: the order of the catch blocks is important. /// Remember: the order of the catch blocks is important.
/// ///
#define IRCD_EXCEPTION(parent, name) \ #define IRCD_EXCEPTION(parent, name) \
struct name \ struct [[gnu::visibility("protected")]] name \
:parent \ :parent \
{ \ { \
template<class... args> \ template<class... args> \
@ -180,7 +180,7 @@ struct name \
/// Hides the name of the exception when generating a string /// Hides the name of the exception when generating a string
#define IRCD_EXCEPTION_HIDENAME(parent, name) \ #define IRCD_EXCEPTION_HIDENAME(parent, name) \
struct name \ struct [[gnu::visibility("protected")]] name \
:parent \ :parent \
{ \ { \
template<class... args> \ template<class... args> \

View file

@ -56,15 +56,15 @@ class ircd::fmt::snprintf
const_buffer fmt; // Current running position in the fmtstr. const_buffer fmt; // Current running position in the fmtstr.
short idx; // Keeps count of the args for better err msgs short idx; // Keeps count of the args for better err msgs
protected: bool finished() const noexcept;
bool finished() const; size_t remaining() const noexcept;
size_t remaining() const;
size_t consumed() const { return out.consumed(); } size_t consumed() const { return out.consumed(); }
string_view completed() const { return out.completed(); } string_view completed() const { return out.completed(); }
void append(const string_view &); void append(const string_view &);
void argument(const arg &); void argument(const arg &);
protected:
IRCD_OVERLOAD(internal) IRCD_OVERLOAD(internal)
snprintf(internal_t, const mutable_buffer &, const string_view &, const va_rtti &); snprintf(internal_t, const mutable_buffer &, const string_view &, const va_rtti &);

View file

@ -17,7 +17,8 @@
// definition file if you need low level access to this acceptor API. // definition file if you need low level access to this acceptor API.
/// Implementation to net::listener. See listener.h for additional interface. /// Implementation to net::listener. See listener.h for additional interface.
struct ircd::net::acceptor struct [[gnu::visibility("protected")]]
ircd::net::acceptor
:std::enable_shared_from_this<struct ircd::net::acceptor> :std::enable_shared_from_this<struct ircd::net::acceptor>
{ {
using error_code = boost::system::error_code; using error_code = boost::system::error_code;

View file

@ -16,7 +16,8 @@
// is part of the <ircd/asio.h> stack which can be included in your // is part of the <ircd/asio.h> stack which can be included in your
// definition file if you need low level access to this acceptor API. // definition file if you need low level access to this acceptor API.
struct ircd::net::acceptor_udp struct [[gnu::visibility("protected")]]
ircd::net::acceptor_udp
{ {
using error_code = boost::system::error_code; using error_code = boost::system::error_code;
using datagram = listener_udp::datagram; using datagram = listener_udp::datagram;

View file

@ -101,9 +101,14 @@ struct ircd::net::dns::opts
}; };
/// (internal) /// (internal)
struct ircd::net::dns::init class [[gnu::visibility("hidden")]]
ircd::net::dns::init
{ {
static void service_init(), service_fini() noexcept; static void
service_init(),
service_fini() noexcept;
init(), ~init() noexcept; public:
init();
~init() noexcept;
}; };

View file

@ -27,7 +27,8 @@ namespace ircd::net::dns
uint16_t resolver_call(const hostport &, const opts &); uint16_t resolver_call(const hostport &, const opts &);
} }
struct ircd::net::dns::resolver struct [[gnu::visibility("protected")]]
ircd::net::dns::resolver
{ {
using header = rfc1035::header; using header = rfc1035::header;
@ -100,7 +101,8 @@ struct ircd::net::dns::resolver
~resolver() noexcept; ~resolver() noexcept;
}; };
struct ircd::net::dns::tag struct [[gnu::visibility("protected")]]
ircd::net::dns::tag
{ {
uint16_t id {0}; uint16_t id {0};
hostport hp; hostport hp;

View file

@ -26,7 +26,8 @@ namespace ircd::net
/// Internal socket interface /// Internal socket interface
/// ///
struct ircd::net::socket struct [[gnu::visibility("protected")]]
ircd::net::socket
:std::enable_shared_from_this<ircd::net::socket> :std::enable_shared_from_this<ircd::net::socket>
{ {
struct io; struct io;

View file

@ -26,7 +26,7 @@ namespace ircd
/// the triggering callsite should be eliminated. Nevertheless it throws /// the triggering callsite should be eliminated. Nevertheless it throws
/// normally in release mode for recovering at an exception handler. /// normally in release mode for recovering at an exception handler.
#define IRCD_PANICKING(parent, name) \ #define IRCD_PANICKING(parent, name) \
struct name \ struct [[gnu::visibility("protected")]] name \
:parent \ :parent \
{ \ { \
template<class... args> \ template<class... args> \

View file

@ -71,7 +71,6 @@ struct ircd::rfc3986::uri
uri() = default; uri() = default;
}; };
#pragma GCC visibility push(default)
// Exposition of individual grammatical elements. Due to the diverse and // Exposition of individual grammatical elements. Due to the diverse and
// foundational applications of this unit, we offer a public list of references // foundational applications of this unit, we offer a public list of references
// to individual rules in the grammar; many of these are directly specified in // to individual rules in the grammar; many of these are directly specified in
@ -81,6 +80,7 @@ struct ircd::rfc3986::uri
// which take a reference to any apropos rule. To avoid exposure of // which take a reference to any apropos rule. To avoid exposure of
// boost::spirit in project headers these types are carefully crafted thin forward // boost::spirit in project headers these types are carefully crafted thin forward
// declarations, so spirit itself is not included here. // declarations, so spirit itself is not included here.
#pragma GCC visibility push(default)
namespace ircd::rfc3986::parser namespace ircd::rfc3986::parser
{ {
using it = const char *; using it = const char *;

View file

@ -136,7 +136,8 @@ struct ircd::run::changed
/// otherwise an exception is thrown. /// otherwise an exception is thrown.
/// ///
template<class E> template<class E>
struct ircd::run::barrier struct [[gnu::visibility("internal")]]
ircd::run::barrier
{ {
template<class... args> template<class... args>
barrier(args&&... a) barrier(args&&... a)

View file

@ -2224,11 +2224,13 @@ ircd::cl::offload_opts
"cl" "cl"
}; };
[[gnu::visibility("hidden")]]
void void
ircd::cl::work::init() ircd::cl::work::init()
{ {
} }
[[using gnu: cold, visibility("hidden")]]
void void
ircd::cl::work::fini() ircd::cl::work::fini()
noexcept noexcept

View file

@ -246,11 +246,13 @@ noexcept
// //
// Out-of-line placement // Out-of-line placement
[[gnu::visibility("protected")]]
ircd::exception::~exception() ircd::exception::~exception()
noexcept noexcept
{ {
} }
[[gnu::visibility("protected")]]
ssize_t ssize_t
ircd::exception::generate(const string_view &fmt, ircd::exception::generate(const string_view &fmt,
const va_rtti &ap) const va_rtti &ap)
@ -259,6 +261,7 @@ noexcept
return fmt::vsnprintf(buf, sizeof(buf), fmt, ap); return fmt::vsnprintf(buf, sizeof(buf), fmt, ap);
} }
[[gnu::visibility("protected")]]
ssize_t ssize_t
ircd::exception::generate(const char *const &name, ircd::exception::generate(const char *const &name,
const string_view &fmt, const string_view &fmt,
@ -275,6 +278,7 @@ noexcept
return size; return size;
} }
[[gnu::visibility("protected")]]
const char * const char *
ircd::exception::what() ircd::exception::what()
const noexcept const noexcept

View file

@ -8,8 +8,7 @@
// copyright notice and this permission notice is present in all copies. The // copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file. // full license for this software is available in the LICENSE file.
namespace ircd { namespace fmt namespace ircd::fmt
__attribute__((visibility("internal")))
{ {
using namespace ircd::spirit; using namespace ircd::spirit;
@ -29,22 +28,23 @@ __attribute__((visibility("internal")))
constexpr char SPECIFIER_TERMINATOR {'$'}; constexpr char SPECIFIER_TERMINATOR {'$'};
template<class generator> template<class generator>
bool generate_string(char *&out, const size_t &max, generator&&, const arg &val); static bool generate_string(char *&out, const size_t &max, generator&&, const arg &val);
template<class gen, template<class gen,
class... attr> class... attr>
bool generate(mutable_buffer &, gen&&, attr&&...); static bool generate(mutable_buffer &, gen&&, attr&&...);
template<class T, template<class T,
class lambda> class lambda>
bool visit_type(const arg &val, lambda&& closure); static bool visit_type(const arg &val, lambda&& closure);
void handle_specifier(mutable_buffer &out, const uint &idx, const spec &, const arg &); static void handle_specifier(mutable_buffer &out, const uint &idx, const spec &, const arg &);
}} }
/// Structural representation of a format specifier. The parse of each /// Structural representation of a format specifier. The parse of each
/// specifier in the format string creates one of these. /// specifier in the format string creates one of these.
struct ircd::fmt::spec struct [[gnu::visibility("internal")]]
ircd::fmt::spec
{ {
char sign {'+'}; char sign {'+'};
char pad {' '}; char pad {' '};
@ -67,12 +67,15 @@ BOOST_FUSION_ADAPT_STRUCT
) )
#pragma GCC visibility pop #pragma GCC visibility pop
#pragma GCC visibility push(internal)
/// The format string parser grammar. /// The format string parser grammar.
namespace ircd::fmt::parser namespace ircd::fmt::parser
{ {
template<class R = unused_type> template<class R = unused_type>
using rule = qi::rule<const char *, R>; struct [[gnu::visibility("internal")]] rule
:qi::rule<const char *, R>
{
using qi::rule<const char *, R>::rule;
};
const expr specsym const expr specsym
{ {
@ -104,13 +107,13 @@ namespace ircd::fmt::parser
"specifier" "specifier"
}; };
} }
#pragma GCC visibility pop
/// A format specifier handler module. This allows a new "%foo" to be defined /// A format specifier handler module. This allows a new "%foo" to be defined
/// with custom handling by overriding. This abstraction is inserted into a /// with custom handling by overriding. This abstraction is inserted into a
/// mapping key'ed by the supplied names leading to an instance of this. /// mapping key'ed by the supplied names leading to an instance of this.
/// ///
class ircd::fmt::specifier class [[gnu::visibility("hidden")]]
ircd::fmt::specifier
{ {
static std::map<string_view, const specifier *, std::less<>> registry; static std::map<string_view, const specifier *, std::less<>> registry;
@ -130,7 +133,8 @@ class ircd::fmt::specifier
decltype(ircd::fmt::specifier::registry) decltype(ircd::fmt::specifier::registry)
ircd::fmt::specifier::registry; ircd::fmt::specifier::registry;
struct ircd::fmt::string_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::string_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -156,7 +160,8 @@ const ircd::fmt::string_specifier
decltype(ircd::fmt::string_specifier::types) decltype(ircd::fmt::string_specifier::types)
ircd::fmt::string_specifier::types; ircd::fmt::string_specifier::types;
struct ircd::fmt::bool_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::bool_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -181,7 +186,8 @@ const ircd::fmt::bool_specifier
decltype(ircd::fmt::bool_specifier::types) decltype(ircd::fmt::bool_specifier::types)
ircd::fmt::bool_specifier::types; ircd::fmt::bool_specifier::types;
struct ircd::fmt::signed_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::signed_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -206,7 +212,8 @@ const ircd::fmt::signed_specifier
decltype(ircd::fmt::signed_specifier::types) decltype(ircd::fmt::signed_specifier::types)
ircd::fmt::signed_specifier::types; ircd::fmt::signed_specifier::types;
struct ircd::fmt::unsigned_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::unsigned_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -228,7 +235,8 @@ const ircd::fmt::unsigned_specifier
{ "u"s, "lu"s, "zu"s } { "u"s, "lu"s, "zu"s }
}; };
struct ircd::fmt::hex_lowercase_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::hex_lowercase_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -253,7 +261,8 @@ const ircd::fmt::hex_lowercase_specifier
decltype(ircd::fmt::hex_lowercase_specifier::types) decltype(ircd::fmt::hex_lowercase_specifier::types)
ircd::fmt::hex_lowercase_specifier::types; ircd::fmt::hex_lowercase_specifier::types;
struct ircd::fmt::hex_uppercase_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::hex_uppercase_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -281,7 +290,8 @@ ircd::fmt::hex_uppercase_specifier::types;
decltype(ircd::fmt::unsigned_specifier::types) decltype(ircd::fmt::unsigned_specifier::types)
ircd::fmt::unsigned_specifier::types; ircd::fmt::unsigned_specifier::types;
struct ircd::fmt::float_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::float_specifier
:specifier :specifier
{ {
static const std::tuple static const std::tuple
@ -306,7 +316,8 @@ const ircd::fmt::float_specifier
decltype(ircd::fmt::float_specifier::types) decltype(ircd::fmt::float_specifier::types)
ircd::fmt::float_specifier::types; ircd::fmt::float_specifier::types;
struct ircd::fmt::char_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::char_specifier
:specifier :specifier
{ {
bool operator()(char *&out, const size_t &max, const spec &, const arg &val) const override; bool operator()(char *&out, const size_t &max, const spec &, const arg &val) const override;
@ -317,7 +328,8 @@ const ircd::fmt::char_specifier
"c"s "c"s
}; };
struct ircd::fmt::pointer_specifier struct [[gnu::visibility("hidden")]]
ircd::fmt::pointer_specifier
:specifier :specifier
{ {
bool operator()(char *&out, const size_t &max, const spec &, const arg &val) const override; bool operator()(char *&out, const size_t &max, const spec &, const arg &val) const override;
@ -332,6 +344,7 @@ const ircd::fmt::pointer_specifier
// snprintf::snprintf // snprintf::snprintf
// //
[[gnu::visibility("protected")]]
ircd::fmt::snprintf::snprintf(internal_t, ircd::fmt::snprintf::snprintf(internal_t,
const mutable_buffer &out, const mutable_buffer &out,
const string_view &fmt, const string_view &fmt,
@ -386,6 +399,7 @@ catch(const std::out_of_range &e)
}; };
} }
[[gnu::visibility("hidden")]]
void void
ircd::fmt::snprintf::argument(const arg &val) ircd::fmt::snprintf::argument(const arg &val)
{ {
@ -426,6 +440,7 @@ ircd::fmt::snprintf::argument(const arg &val)
consume(this->fmt, size(leg)); consume(this->fmt, size(leg));
} }
[[gnu::visibility("hidden")]]
void void
ircd::fmt::snprintf::append(const string_view &src) ircd::fmt::snprintf::append(const string_view &src)
{ {
@ -435,18 +450,20 @@ ircd::fmt::snprintf::append(const string_view &src)
}); });
} }
[[gnu::visibility("hidden")]]
size_t size_t
ircd::fmt::snprintf::remaining() ircd::fmt::snprintf::remaining()
const const noexcept
{ {
return out.remaining()? return out.remaining()?
out.remaining() - 1: out.remaining() - 1:
0; 0;
} }
[[gnu::visibility("hidden")]]
bool bool
ircd::fmt::snprintf::finished() ircd::fmt::snprintf::finished()
const const noexcept
{ {
return empty(fmt) || !remaining(); return empty(fmt) || !remaining();
} }

View file

@ -12,6 +12,7 @@
#pragma STDC FENV_ACCESS on #pragma STDC FENV_ACCESS on
#endif #endif
[[gnu::visibility("protected")]]
void void
ircd::fpe::debug_info() ircd::fpe::debug_info()
{ {

View file

@ -56,6 +56,7 @@ ircd::boost_version_abi
"boost", info::versions::ABI //TODO: get this "boost", info::versions::ABI //TODO: get this
}; };
[[gnu::visibility("hidden")]]
void void
ircd::ios::init(asio::executor &&user) ircd::ios::init(asio::executor &&user)
{ {
@ -78,7 +79,7 @@ ircd::ios::init(asio::executor &&user)
ios::main = *ios::primary; ios::main = *ios::primary;
} }
[[gnu::cold]] [[using gnu: cold, visibility("hidden")]]
void void
ircd::ios::forking() ircd::ios::forking()
{ {
@ -89,7 +90,7 @@ ircd::ios::forking()
#endif #endif
} }
[[gnu::cold]] [[using gnu: cold, visibility("hidden")]]
void void
ircd::ios::forked_child() ircd::ios::forked_child()
{ {
@ -100,7 +101,7 @@ ircd::ios::forked_child()
#endif #endif
} }
[[gnu::cold]] [[using gnu: cold, visibility("hidden")]]
void void
ircd::ios::forked_parent() ircd::ios::forked_parent()
{ {

View file

@ -121,6 +121,7 @@ ircd::log::hook;
// init // init
// //
[[gnu::visibility("hidden")]]
void void
ircd::log::init() ircd::log::init()
{ {
@ -145,6 +146,7 @@ ircd::log::init()
ircd::log::ready = true; ircd::log::ready = true;
} }
[[using gnu: cold, visibility("hidden")]]
void void
ircd::log::fini() ircd::log::fini()
{ {

View file

@ -1215,6 +1215,7 @@ ircd::net::ssl_cipher_blacklist
{ "default", string_view{} }, { "default", string_view{} },
}; };
[[gnu::visibility("hidden")]]
boost::asio::ssl::context boost::asio::ssl::context
ircd::net::sslv23_client ircd::net::sslv23_client
{ {
@ -1222,12 +1223,10 @@ ircd::net::sslv23_client
}; };
decltype(ircd::net::socket::count) decltype(ircd::net::socket::count)
ircd::net::socket::count ircd::net::socket::count;
{};
decltype(ircd::net::socket::instances) decltype(ircd::net::socket::instances)
ircd::net::socket::instances ircd::net::socket::instances;
{};
decltype(ircd::net::socket::desc_connect) decltype(ircd::net::socket::desc_connect)
ircd::net::socket::desc_connect ircd::net::socket::desc_connect
@ -2698,6 +2697,7 @@ ircd::net::string(const mutable_buffer &buf,
}; };
} }
[[gnu::visibility("protected")]]
ircd::net::ipport ircd::net::ipport
ircd::net::make_ipport(const boost::asio::ip::udp::endpoint &ep) ircd::net::make_ipport(const boost::asio::ip::udp::endpoint &ep)
{ {
@ -2707,6 +2707,7 @@ ircd::net::make_ipport(const boost::asio::ip::udp::endpoint &ep)
}; };
} }
[[gnu::visibility("protected")]]
ircd::net::ipport ircd::net::ipport
ircd::net::make_ipport(const boost::asio::ip::tcp::endpoint &ep) ircd::net::make_ipport(const boost::asio::ip::tcp::endpoint &ep)
{ {
@ -2716,6 +2717,7 @@ ircd::net::make_ipport(const boost::asio::ip::tcp::endpoint &ep)
}; };
} }
[[gnu::visibility("protected")]]
boost::asio::ip::udp::endpoint boost::asio::ip::udp::endpoint
ircd::net::make_endpoint_udp(const ipport &ipport) ircd::net::make_endpoint_udp(const ipport &ipport)
{ {
@ -2725,6 +2727,7 @@ ircd::net::make_endpoint_udp(const ipport &ipport)
}; };
} }
[[gnu::visibility("protected")]]
boost::asio::ip::tcp::endpoint boost::asio::ip::tcp::endpoint
ircd::net::make_endpoint(const ipport &ipport) ircd::net::make_endpoint(const ipport &ipport)
{ {
@ -2757,6 +2760,7 @@ const
// net/ipaddr.h // net/ipaddr.h
// //
[[gnu::visibility("protected")]]
boost::asio::ip::address boost::asio::ip::address
ircd::net::make_address(const ipaddr &ipaddr) ircd::net::make_address(const ipaddr &ipaddr)
{ {
@ -2765,6 +2769,7 @@ ircd::net::make_address(const ipaddr &ipaddr)
ip::address(make_address(ipaddr.v6)); ip::address(make_address(ipaddr.v6));
} }
[[gnu::visibility("protected")]]
boost::asio::ip::address boost::asio::ip::address
ircd::net::make_address(const string_view &ip) ircd::net::make_address(const string_view &ip)
try try
@ -2781,12 +2786,14 @@ catch(const boost::system::system_error &e)
throw_system_error(e); throw_system_error(e);
} }
[[gnu::visibility("protected")]]
boost::asio::ip::address_v4 boost::asio::ip::address_v4
ircd::net::make_address(const uint32_t &ip) ircd::net::make_address(const uint32_t &ip)
{ {
return ip::address_v4{ip}; return ip::address_v4{ip};
} }
[[gnu::visibility("protected")]]
boost::asio::ip::address_v6 boost::asio::ip::address_v6
ircd::net::make_address(const uint128_t &ip) ircd::net::make_address(const uint128_t &ip)
{ {
@ -2906,6 +2913,7 @@ ircd::net::ipaddr::ipaddr(const uint128_t &ip)
{ {
} }
[[gnu::visibility("protected")]]
ircd::net::ipaddr::ipaddr(const asio::ip::address &address) ircd::net::ipaddr::ipaddr(const asio::ip::address &address)
{ {
const auto address_ const auto address_
@ -3080,12 +3088,14 @@ ircd::net::string(const mutable_buffer &buf,
// net/asio.h // net/asio.h
// //
[[gnu::visibility("protected")]]
std::string std::string
ircd::net::string(const ip::tcp::endpoint &ep) ircd::net::string(const ip::tcp::endpoint &ep)
{ {
return string(make_ipport(ep)); return string(make_ipport(ep));
} }
[[gnu::visibility("protected")]]
ircd::string_view ircd::string_view
ircd::net::string(const mutable_buffer &buf, ircd::net::string(const mutable_buffer &buf,
const ip::tcp::endpoint &ep) const ip::tcp::endpoint &ep)
@ -3093,24 +3103,28 @@ ircd::net::string(const mutable_buffer &buf,
return string(buf, make_ipport(ep)); return string(buf, make_ipport(ep));
} }
[[gnu::visibility("protected")]]
std::string std::string
ircd::net::host(const ip::tcp::endpoint &ep) ircd::net::host(const ip::tcp::endpoint &ep)
{ {
return string(addr(ep)); return string(addr(ep));
} }
[[gnu::visibility("protected")]]
boost::asio::ip::address boost::asio::ip::address
ircd::net::addr(const ip::tcp::endpoint &ep) ircd::net::addr(const ip::tcp::endpoint &ep)
{ {
return ep.address(); return ep.address();
} }
[[gnu::visibility("protected")]]
uint16_t uint16_t
ircd::net::port(const ip::tcp::endpoint &ep) ircd::net::port(const ip::tcp::endpoint &ep)
{ {
return ep.port(); return ep.port();
} }
[[gnu::visibility("protected")]]
std::string std::string
ircd::net::string(const ip::address &addr) ircd::net::string(const ip::address &addr)
{ {
@ -3120,6 +3134,7 @@ ircd::net::string(const ip::address &addr)
string(addr.to_v6()); string(addr.to_v6());
} }
[[gnu::visibility("protected")]]
std::string std::string
ircd::net::string(const ip::address_v4 &addr) ircd::net::string(const ip::address_v4 &addr)
{ {
@ -3130,12 +3145,14 @@ ircd::net::string(const ip::address_v4 &addr)
}); });
} }
[[gnu::visibility("protected")]]
std::string std::string
ircd::net::string(const ip::address_v6 &addr) ircd::net::string(const ip::address_v6 &addr)
{ {
return addr.to_string(); return addr.to_string();
} }
[[gnu::visibility("protected")]]
ircd::string_view ircd::string_view
ircd::net::string(const mutable_buffer &out, ircd::net::string(const mutable_buffer &out,
const ip::address &addr) const ip::address &addr)
@ -3146,6 +3163,7 @@ ircd::net::string(const mutable_buffer &out,
string(out, addr.to_v6()); string(out, addr.to_v6());
} }
[[gnu::visibility("protected")]]
ircd::string_view ircd::string_view
ircd::net::string(const mutable_buffer &out, ircd::net::string(const mutable_buffer &out,
const ip::address_v4 &addr) const ip::address_v4 &addr)
@ -3161,6 +3179,7 @@ ircd::net::string(const mutable_buffer &out,
}; };
} }
[[gnu::visibility("protected")]]
ircd::string_view ircd::string_view
ircd::net::string(const mutable_buffer &out, ircd::net::string(const mutable_buffer &out,
const ip::address_v6 &addr) const ip::address_v6 &addr)
@ -3188,6 +3207,7 @@ ircd::buffer::null_buffers
null_buffer null_buffer
}}; }};
[[gnu::visibility("protected")]]
ircd::buffer::mutable_buffer::operator ircd::buffer::mutable_buffer::operator
boost::asio::mutable_buffer() boost::asio::mutable_buffer()
const noexcept const noexcept
@ -3198,6 +3218,7 @@ const noexcept
}; };
} }
[[gnu::visibility("protected")]]
ircd::buffer::const_buffer::operator ircd::buffer::const_buffer::operator
boost::asio::const_buffer() boost::asio::const_buffer()
const noexcept const noexcept

View file

@ -22,6 +22,7 @@ namespace ircd::net::dns
/// Custom internal database. This translates a service name and protocol /// Custom internal database. This translates a service name and protocol
/// into a port number. Note that a query to this table will only be made /// into a port number. Note that a query to this table will only be made
/// after the system query does not return results (or cannot be made). /// after the system query does not return results (or cannot be made).
[[gnu::visibility("internal")]]
decltype(ircd::net::dns::service_ports) decltype(ircd::net::dns::service_ports)
ircd::net::dns::service_ports ircd::net::dns::service_ports
{ {
@ -31,6 +32,7 @@ ircd::net::dns::service_ports
/// Custom internal database. This translates a service port and protocol /// Custom internal database. This translates a service port and protocol
/// into a service name. Note that a query to this table will only be made /// into a service name. Note that a query to this table will only be made
/// after the system query does not return results (or cannot be made). /// after the system query does not return results (or cannot be made).
[[gnu::visibility("internal")]]
decltype(ircd::net::dns::service_names) decltype(ircd::net::dns::service_names)
ircd::net::dns::service_names ircd::net::dns::service_names
{ {

View file

@ -12,6 +12,7 @@
#include <RB_INC_VALGRIND_MEMCHECK_H #include <RB_INC_VALGRIND_MEMCHECK_H
#include <RB_INC_VALGRIND_CALLGRIND_H #include <RB_INC_VALGRIND_CALLGRIND_H
[[gnu::visibility("protected")]]
void void
ircd::vg::set_noaccess(const const_buffer &buf) ircd::vg::set_noaccess(const const_buffer &buf)
noexcept noexcept
@ -21,6 +22,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
void void
ircd::vg::set_undefined(const const_buffer &buf) ircd::vg::set_undefined(const const_buffer &buf)
noexcept noexcept
@ -30,6 +32,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
void void
ircd::vg::set_defined(const const_buffer &buf) ircd::vg::set_defined(const const_buffer &buf)
noexcept noexcept
@ -39,6 +42,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
bool bool
ircd::vg::defined(const const_buffer &buf) ircd::vg::defined(const const_buffer &buf)
noexcept noexcept
@ -50,6 +54,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
size_t size_t
ircd::vg::errors() ircd::vg::errors()
noexcept noexcept
@ -75,6 +80,7 @@ ircd::vg::active{[]() -> bool
// vg::stack // vg::stack
// //
[[gnu::visibility("protected")]]
void void
ircd::vg::stack::del(const uint &id) ircd::vg::stack::del(const uint &id)
noexcept noexcept
@ -84,6 +90,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
uint uint
ircd::vg::stack::add(const mutable_buffer &buf) ircd::vg::stack::add(const mutable_buffer &buf)
noexcept noexcept
@ -105,6 +112,7 @@ namespace ircd::prof::vg
static bool _enabled; static bool _enabled;
} }
[[gnu::visibility("protected")]]
void void
ircd::prof::vg::stop() ircd::prof::vg::stop()
noexcept noexcept
@ -116,6 +124,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
void void
ircd::prof::vg::start() ircd::prof::vg::start()
noexcept noexcept
@ -127,6 +136,7 @@ noexcept
#endif #endif
} }
[[gnu::visibility("protected")]]
void void
ircd::prof::vg::reset() ircd::prof::vg::reset()
{ {
@ -135,6 +145,7 @@ ircd::prof::vg::reset()
#endif #endif
} }
[[gnu::visibility("protected")]]
void void
ircd::prof::vg::toggle() ircd::prof::vg::toggle()
{ {
@ -143,6 +154,7 @@ ircd::prof::vg::toggle()
#endif #endif
} }
[[gnu::visibility("protected")]]
void void
ircd::prof::vg::dump(const char *const reason) ircd::prof::vg::dump(const char *const reason)
{ {
@ -151,6 +163,7 @@ ircd::prof::vg::dump(const char *const reason)
#endif #endif
} }
[[gnu::visibility("protected")]]
bool bool
ircd::prof::vg::enabled() ircd::prof::vg::enabled()
{ {