[all-commits] [llvm/llvm-project] 472c00: [llvm-reduce] Exit when input module is malformed

Langston Barrett via All-commits all-commits at lists.llvm.org
Tue May 25 10:01:33 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 472c009139eaf5c516395e669b1a70b118a514f8
      https://github.com/llvm/llvm-project/commit/472c009139eaf5c516395e669b1a70b118a514f8
  Author: Langston Barrett <langston.barrett at gmail.com>
  Date:   2021-05-25 (Tue, 25 May 2021)

  Changed paths:
    A llvm/test/tools/llvm-reduce/fail-file-open.test
    M llvm/tools/llvm-reduce/llvm-reduce.cpp

  Log Message:
  -----------
  [llvm-reduce] Exit when input module is malformed

The parseInputFile function returns an empty unique_ptr to signal an
error, like when the input file doesn't exist, or is malformed. In this
case, the tool should exit immediately rather than segfault by
dereferencing the unique_ptr later.

Reviewed By: aeubanks

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




More information about the All-commits mailing list