[all-commits] [llvm/llvm-project] 36ae25: [opt] Fix run-twice crash and detection problem

Kókai Péter via All-commits all-commits at lists.llvm.org
Mon Dec 30 00:42:52 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 36ae255663cfbe1813fcda7de421e3e10c00c91b
      https://github.com/llvm/llvm-project/commit/36ae255663cfbe1813fcda7de421e3e10c00c91b
  Author: Peter Kokai <kokaipeter at gmail.com>
  Date:   2019-12-30 (Mon, 30 Dec 2019)

  Changed paths:
    M llvm/tools/opt/opt.cpp

  Log Message:
  -----------
  [opt] Fix run-twice crash and detection problem

1. Execute `opt -run-twice a.ll` with in a terminal will crash.
   https://bugs.llvm.org/show_bug.cgi?id=44382
2. `-run-twice` saves output into two buffers and compares them.
   When outputing the result is disabled, that produces two empty string thus
   they are going to be equal all the time resulting false-positive results.

The proposed solution is to generate the results even if the output will not be
emitted, as that is required for the comparision.

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




More information about the All-commits mailing list