[all-commits] [llvm/llvm-project] 67ba5c: std::optional::value => operator*/operator->

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Dec 16 17:42:54 PST 2022


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

  Changed paths:
    M llvm/include/llvm/ADT/STLForwardCompat.h
    M llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
    M llvm/lib/Debuginfod/Debuginfod.cpp
    M llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
    M llvm/lib/ObjectYAML/DXContainerEmitter.cpp
    M llvm/tools/llc/llc.cpp
    M llvm/tools/lli/lli.cpp
    M llvm/tools/llvm-cov/CoverageExporterJson.cpp
    M llvm/tools/llvm-ifs/llvm-ifs.cpp
    M llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
    M llvm/tools/llvm-objdump/XCOFFDump.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-sim/llvm-sim.cpp
    M llvm/tools/obj2yaml/dwarf2yaml.cpp
    M llvm/unittests/ADT/STLForwardCompatTest.cpp
    M llvm/unittests/Analysis/BlockFrequencyInfoTest.cpp
    M llvm/unittests/Analysis/VectorFunctionABITest.cpp
    M llvm/unittests/CodeGen/GlobalISel/ConstantFoldingTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFFormValueTest.cpp
    M llvm/unittests/IR/MetadataTest.cpp
    M llvm/unittests/IR/VPIntrinsicTest.cpp
    M llvm/unittests/InterfaceStub/ELFYAMLTest.cpp
    M llvm/unittests/Object/XCOFFObjectFileTest.cpp
    M llvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
    M llvm/unittests/ProfileData/MemProfTest.cpp
    M llvm/unittests/TableGen/ParserEntryPointTest.cpp

  Log Message:
  -----------
  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 check-llvm.




More information about the All-commits mailing list