Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).

llvm-svn: 321658
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 40a01d5314ffc3c5f4c379cd69015f962dde5f72
diff --git a/include/optional b/include/optional
index 35a4d74..88fd6b5 100644
--- a/include/optional
+++ b/include/optional
@@ -22,7 +22,7 @@
 
   // 23.6.4, no-value state indicator
   struct nullopt_t{see below };
-  constexpr nullopt_t nullopt(unspecified );
+  inline constexpr nullopt_t nullopt(unspecified );
 
   // 23.6.5, class bad_optional_access
   class bad_optional_access;
@@ -195,7 +195,7 @@
     _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {}
 };
 
-/* inline */ constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
+_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
 
 template <class _Tp, bool = is_trivially_destructible<_Tp>::value>
 struct __optional_destruct_base;