[all-commits] [llvm/llvm-project] 1a9439: [Utils] stripDebugifyMetadata - use cast<> instead...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Mar 25 03:32:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1a943923b8bc000ae03b22a05413918723d2d044
      https://github.com/llvm/llvm-project/commit/1a943923b8bc000ae03b22a05413918723d2d044
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-25 (Fri, 25 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/Debugify.cpp

  Log Message:
  -----------
  [Utils] stripDebugifyMetadata - use cast<> instead of dyn_cast_or_null<> to avoid dereference of nullptr

The pointer is dereferenced immediately, so assert the cast is correct instead of returning nullptr


  Commit: e699b5da445207d0957839aad139ee62f31cb0f5
      https://github.com/llvm/llvm-project/commit/e699b5da445207d0957839aad139ee62f31cb0f5
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-25 (Fri, 25 Mar 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

  Log Message:
  -----------
  [AArch64] isProfitableToHoist - remove nullptr test

User is dereferenced on the main codepath so the null test is likely superfluous


Compare: https://github.com/llvm/llvm-project/compare/ae95f291e8d9...e699b5da4452


More information about the All-commits mailing list