[PATCH] D51836: [bugpoint] Fix TempFile scoping bug

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 12:27:38 PDT 2018


Meinersbur added inline comments.


================
Comment at: tools/bugpoint/ExecutionDriver.cpp:439
   Expected<std::string> Output =
       executeProgram(Program, "", BitcodeFile, SharedObject, nullptr);
   if (Error E = Output.takeError())
----------------
hintonda wrote:
> Meinersbur wrote:
> > [serious] Here is another call to `executeProgram`. `BitcodeFile` can be empty as well (e.g. `BugDriver.cpp:218`) which will fail if only `executeProgramSafely` handles creating the bitcode file.
> Yes, you're correct.  Looks like just rolling back r318459 with a note that you can't use TempFile in this case.  Does that sound like the correct fix?
Have you considered wrapping `executeProgram` inside a function that creates (and discards) the bitfile (instead of hoisting that code into `executeProgramSafely`)?


Repository:
  rL LLVM

https://reviews.llvm.org/D51836





More information about the llvm-commits mailing list