[all-commits] [llvm/llvm-project] 500b4a: [PowerPC] Fix downcast from nullptr for target str...

Ng Zhi An via All-commits all-commits at lists.llvm.org
Tue Apr 28 02:23:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 500b4ad5f4e5d5b712d00430ed96ac94a6207063
      https://github.com/llvm/llvm-project/commit/500b4ad5f4e5d5b712d00430ed96ac94a6207063
  Author: Ng Zhi An <ngzhian at gmail.com>
  Date:   2020-04-28 (Tue, 28 Apr 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/test/CodeGen/PowerPC/ppc64-toc.ll
    M llvm/test/MC/PowerPC/ppc-machine.s
    M llvm/test/MC/PowerPC/ppc64-abiversion.s

  Log Message:
  -----------
  [PowerPC] Fix downcast from nullptr for target streamer

getTargetStreamer() might return null (e.g. when running inlined-strings.ll test),
downcasting to a reference will be wrong. This is detectable with -fsanitize=null.

Reviewed By: steven.zhang

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




More information about the All-commits mailing list