[PATCH] D148449: [nfc][llvm] Replace pointer cast functions in PointerUnion by llvm casting functions.

Shraiysh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 15 22:20:02 PDT 2023


shraiysh created this revision.
Herald added subscribers: pmatos, asb, ormris, pengfei, steven_wu, hiraditya, sbc100, MatzeB.
Herald added a project: All.
shraiysh requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, aheejin.
Herald added a project: LLVM.

This patch replaces the uses of PointerUnion.is function by llvm::isa,
PointerUnion.get function by llvm::cast, and PointerUnion.dyn_cast by
llvm::dyn_cast_if_present. This is according to the FIXME in
the definition of the class PointerUnion.

This patch does not remove them as they are being used in other
subprojects.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148449

Files:
  llvm/include/llvm/ADT/FunctionExtras.h
  llvm/include/llvm/ADT/PointerUnion.h
  llvm/include/llvm/ADT/TinyPtrVector.h
  llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h
  llvm/include/llvm/CodeGen/MachineMemOperand.h
  llvm/include/llvm/CodeGen/MachineRegisterInfo.h
  llvm/include/llvm/CodeGen/SelectionDAGNodes.h
  llvm/include/llvm/CodeGen/WasmEHFuncInfo.h
  llvm/include/llvm/IR/GetElementPtrTypeIterator.h
  llvm/include/llvm/IR/IntrinsicInst.h
  llvm/include/llvm/IR/Metadata.h
  llvm/include/llvm/Transforms/Utils/Evaluator.h
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
  llvm/lib/CodeGen/AsmPrinter/DIE.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  llvm/lib/CodeGen/AsmPrinter/WinException.cpp
  llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp
  llvm/lib/CodeGen/GlobalISel/Utils.cpp
  llvm/lib/CodeGen/MachineOperand.cpp
  llvm/lib/CodeGen/MachineRegisterInfo.cpp
  llvm/lib/CodeGen/RegisterBankInfo.cpp
  llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
  llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  llvm/lib/CodeGen/WinEHPrepare.cpp
  llvm/lib/DebugInfo/LogicalView/LVReaderHandler.cpp
  llvm/lib/DebugInfo/PDB/Native/InputFile.cpp
  llvm/lib/IR/DIBuilder.cpp
  llvm/lib/IR/Metadata.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/lib/LTO/LTO.cpp
  llvm/lib/LTO/LTOModule.cpp
  llvm/lib/Object/IRSymtab.cpp
  llvm/lib/Object/ModuleSymbolTable.cpp
  llvm/lib/Target/X86/X86InstructionSelector.cpp
  llvm/lib/Transforms/IPO/LowerTypeTests.cpp
  llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
  llvm/lib/Transforms/Utils/Evaluator.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/tools/llvm-reduce/ReducerWorkItem.cpp
  llvm/tools/llvm-reduce/deltas/ReduceIRReferences.cpp
  llvm/unittests/ADT/PointerUnionTest.cpp
  llvm/unittests/IR/MetadataTest.cpp
  llvm/utils/TableGen/AsmMatcherEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148449.513962.patch
Type: text/x-patch
Size: 81861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230416/a10ddc4e/attachment.bin>


More information about the llvm-commits mailing list