[all-commits] [llvm/llvm-project] 3a1fd1: [WebAssembly] Use cast<> instead of dyn_cast<> to ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Jan 29 08:08:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a1fd170271da25e7ce9b0a329adf47483378229
      https://github.com/llvm/llvm-project/commit/3a1fd170271da25e7ce9b0a329adf47483378229
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-29 (Sat, 29 Jan 2022)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

  Log Message:
  -----------
  [WebAssembly] Use cast<> instead of dyn_cast<> to avoid dereference of nullptr

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




More information about the All-commits mailing list