HomePhabricator

[opt] Fix run-twice crash and detection problem

Authored by Kokan on Dec 30 2019, 12:22 AM.

Description

[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

Details

Committed
MaskRayDec 30 2019, 12:42 AM
Differential Revision
D71967: [opt] Fix run-twice crash and detection problem
Parents
rGb47b35ff51b3: [Diagnostic] Add ftabstop to -Wmisleading-indentation
Branches
Unknown
Tags
Unknown