[all-commits] [llvm/llvm-project] f64d4a: [llvm] Add support for hashing std::optional

kazutakahirata via All-commits all-commits at lists.llvm.org
Fri Dec 2 18:53:14 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f64d4a26cee0030e4dd70ef74683254ec23fca4c
      https://github.com/llvm/llvm-project/commit/f64d4a26cee0030e4dd70ef74683254ec23fca4c
  Author: Kazu Hirata <kazu at google.com>
  Date:   2022-12-02 (Fri, 02 Dec 2022)

  Changed paths:
    M llvm/include/llvm/ADT/Hashing.h
    M llvm/unittests/ADT/HashingTest.cpp

  Log Message:
  -----------
  [llvm] Add support for hashing std::optional

The credit for the hashing code, taken from D138934, goes to Ramkumar
Ramachandra.  The test comes from OptionalTest.cpp and updated for
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

Differential Revision: https://reviews.llvm.org/D139240




More information about the All-commits mailing list