[all-commits] [llvm/llvm-project] 1235aa: [AArch64][AMDGPU][WebAssembly] Use static_cast ins...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Apr 6 15:10:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1235aaefbd4fe249430732253f30403849232d8e
      https://github.com/llvm/llvm-project/commit/1235aaefbd4fe249430732253f30403849232d8e
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-04-06 (Wed, 06 Apr 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp

  Log Message:
  -----------
  [AArch64][AMDGPU][WebAssembly] Use static_cast instead of a reinterpret_cast to downcast in parseMachineFunctionInfo. NFC

static_cast is a little safer here since the compiler will
ensure we're casting to a class derived from
yaml::MachineFunctionInfo.

I believe this first appeared on AMDGPU and was copied to the
other two targets.

Spotted when it was being copied to RISCV in D123178.

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




More information about the All-commits mailing list