[all-commits] [llvm/llvm-project] c68af4: [lld] Use std::nullopt instead of None (NFC)

kazutakahirata via All-commits all-commits at lists.llvm.org
Fri Dec 2 23:12:59 PST 2022


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

  Changed paths:
    M lld/COFF/DebugTypes.cpp
    M lld/ELF/LTO.cpp
    M lld/ELF/ScriptParser.cpp
    M lld/MachO/InputFiles.cpp
    M lld/MachO/LTO.cpp
    M lld/MachO/SectionPriorities.cpp
    M lld/MinGW/Driver.cpp
    M lld/wasm/Driver.cpp
    M lld/wasm/InputFiles.cpp
    M lld/wasm/LTO.cpp

  Log Message:
  -----------
  [lld] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
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


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

  Changed paths:
    M bolt/include/bolt/Core/BinaryContext.h
    M bolt/include/bolt/Core/BinaryFunction.h
    M bolt/include/bolt/Core/DebugData.h
    M bolt/include/bolt/Core/MCPlusBuilder.h
    M bolt/include/bolt/Passes/ReachingDefOrUse.h
    M bolt/include/bolt/Rewrite/DWARFRewriter.h
    M bolt/lib/Core/BinaryContext.cpp
    M bolt/lib/Core/DebugData.cpp
    M bolt/lib/Core/MCPlusBuilder.cpp
    M bolt/lib/Passes/AsmDump.cpp
    M bolt/lib/Passes/DataflowInfoManager.cpp
    M bolt/lib/Profile/BoltAddressTranslation.cpp
    M bolt/lib/Profile/DataAggregator.cpp
    M bolt/lib/Profile/DataReader.cpp
    M bolt/lib/Rewrite/DWARFRewriter.cpp
    M bolt/lib/Rewrite/MachORewriteInstance.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp
    M bolt/lib/Target/X86/X86MCPlusBuilder.cpp
    M bolt/lib/Utils/Utils.cpp

  Log Message:
  -----------
  [BOLT] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated.  The intent is to reduce
the amount of manual work required in migrating from Optional to
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


Compare: https://github.com/llvm/llvm-project/compare/34b8daf4a817...e324a80fab62


More information about the All-commits mailing list