[all-commits] [llvm/llvm-project] 036e09: [CodeGen] std::optional::value => operator*/operat...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Dec 16 15:41:50 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 036e092282f50d65d78a47d3a009e8baf2e74f46
      https://github.com/llvm/llvm-project/commit/036e092282f50d65d78a47d3a009e8baf2e74f46
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-12-16 (Fri, 16 Dec 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h
    M llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/lib/InterfaceStub/IFSHandler.cpp

  Log Message:
  -----------
  [CodeGen] std::optional::value => operator*/operator->

value() has undesired exception checking semantics and calls
__throw_bad_optional_access in libc++. Moreover, the API is unavailable without
_LIBCPP_NO_EXCEPTIONS on older Mach-O platforms (see
_LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS).

This fixes LLVMMIRParser, LLVMGlobalISel, LLVMAsmPrinter, LLVMSelectionDAG.




More information about the All-commits mailing list