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
5 lines
210 B
Plaintext
5 lines
210 B
Plaintext
# RUN: not llvm-reduce --test=echo %s.NotAFileInTestingDir 2>&1 | FileCheck %s
|
|
|
|
This file will not be read. An invalid file path is fed to llvm-reduce.
|
|
|
|
# CHECK: llvm-reduce: {{.*}}.NotAFileInTestingDir: error: |