@@ -277,21 +277,10 @@ template <typename T> class Optional {
277277 constexpr const T *getPointer () const { return &Storage.value (); }
278278 T *getPointer () { return &Storage.value (); }
279279 constexpr const T &value () const & { return Storage.value (); }
280- LLVM_DEPRECATED (" Use value instead." , " value" )
281- constexpr const T &getValue () const & {
282- return Storage.value ();
283- }
284280 T &value () & { return Storage.value (); }
285- LLVM_DEPRECATED (" Use value instead." , " value" ) T &getValue () & {
286- return Storage.value ();
287- }
288281
289282 constexpr explicit operator bool () const { return has_value (); }
290283 constexpr bool has_value () const { return Storage.has_value (); }
291- LLVM_DEPRECATED (" Use has_value instead." , " has_value" )
292- constexpr bool hasValue () const {
293- return Storage.has_value ();
294- }
295284 constexpr const T *operator ->() const { return getPointer (); }
296285 T *operator ->() { return getPointer (); }
297286 constexpr const T &operator *() const & { return value (); }
@@ -300,11 +289,6 @@ template <typename T> class Optional {
300289 template <typename U> constexpr T value_or (U &&alt) const & {
301290 return has_value () ? value () : std::forward<U>(alt);
302291 }
303- template <typename U>
304- LLVM_DEPRECATED (" Use value_or instead." , " value_or" )
305- constexpr T getValueOr (U &&alt) const & {
306- return has_value () ? value () : std::forward<U>(alt);
307- }
308292
309293 // / Apply a function to the value if present; otherwise return None.
310294 template <class Function >
@@ -313,28 +297,13 @@ template <typename T> class Optional {
313297 return F (value ());
314298 return None;
315299 }
316- template <class Function >
317- LLVM_DEPRECATED (" Use transform instead." , " transform" )
318- auto map (const Function &F) const & -> Optional<decltype(F(value()))> {
319- if (*this )
320- return F (value ());
321- return None;
322- }
323300
324301 T &&value() && { return std::move (Storage.value ()); }
325- LLVM_DEPRECATED (" Use value instead." , " value" ) T &&getValue() && {
326- return std::move (Storage.value ());
327- }
328302 T &&operator *() && { return std::move (Storage.value ()); }
329303
330304 template <typename U> T value_or (U &&alt) && {
331305 return has_value () ? std::move (value ()) : std::forward<U>(alt);
332306 }
333- template <typename U>
334- LLVM_DEPRECATED (" Use value_or instead." , " value_or" )
335- T getValueOr (U &&alt) && {
336- return has_value () ? std::move (value ()) : std::forward<U>(alt);
337- }
338307
339308 // / Apply a function to the value if present; otherwise return None.
340309 template <class Function >
@@ -344,14 +313,6 @@ template <typename T> class Optional {
344313 return F (std::move (*this ).value ());
345314 return None;
346315 }
347- template <class Function >
348- LLVM_DEPRECATED (" Use transform instead." , " transform" )
349- auto map (const Function &F)
350- && -> Optional<decltype(F(std::move(*this ).value()))> {
351- if (*this )
352- return F (std::move (*this ).value ());
353- return None;
354- }
355316};
356317
357318template <typename T>
0 commit comments