[all-commits] [llvm/llvm-project] aeac2e: [llvm] Replace llvm::Any with std::any

Sebastian Neubauer via All-commits all-commits at lists.llvm.org
Thu Dec 8 02:48:19 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aeac2e4884a3ce62c920cd51806a9396da64d9f7
      https://github.com/llvm/llvm-project/commit/aeac2e4884a3ce62c920cd51806a9396da64d9f7
  Author: Sebastian Neubauer <Sebastian.Neubauer at amd.com>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M llvm/include/llvm/IR/PassInstrumentation.h
    M llvm/include/llvm/Passes/StandardInstrumentations.h
    M llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h
    M llvm/lib/CodeGen/MachinePassManager.cpp
    M llvm/lib/CodeGen/TargetPassConfig.cpp
    M llvm/lib/IR/LLVMContextImpl.h
    M llvm/lib/IR/PassTimingInfo.cpp
    M llvm/lib/Passes/StandardInstrumentations.cpp
    M llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
    M llvm/lib/Transforms/Scalar/LoopPassManager.cpp
    M llvm/lib/Transforms/Utils/Debugify.cpp
    M llvm/tools/llvm-reduce/deltas/RunIRPasses.cpp
    M llvm/unittests/IR/PassBuilderCallbacksTest.cpp

  Log Message:
  -----------
  [llvm] Replace llvm::Any with std::any

llvm::Any had several bugs in the past, due to being sensitive to symbol
visibility. (See D101972 and D108943)

Even with these fixes applied, I still encounter the same issue on
Windows.

Similar to llvm::Optional going away in favor of std::optional, we can
use std::any from C++17.

Using std::any fixes the problem and puts the burden to do it correctly
on the standard library.

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




More information about the All-commits mailing list