mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
For PR351:
* removeFile() -> sys::Path::destroyFile() * remove extraneous toString() calls * convert local variables representing path names from std::string to sys::Path * Use sys::Path objects with FileRemove instead of std::string * Use sys::Path methods for construction of path names git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -49,23 +49,25 @@ namespace llvm {
|
||||
ReducePassList::TestResult
|
||||
ReducePassList::doTest(std::vector<const PassInfo*> &Prefix,
|
||||
std::vector<const PassInfo*> &Suffix) {
|
||||
std::string PrefixOutput;
|
||||
sys::Path PrefixOutput;
|
||||
Module *OrigProgram = 0;
|
||||
if (!Prefix.empty()) {
|
||||
std::cout << "Checking to see if these passes crash: "
|
||||
<< getPassesString(Prefix) << ": ";
|
||||
if (BD.runPasses(Prefix, PrefixOutput))
|
||||
std::string PfxOutput;
|
||||
if (BD.runPasses(Prefix, PfxOutput))
|
||||
return KeepPrefix;
|
||||
|
||||
PrefixOutput.setFile(PfxOutput);
|
||||
OrigProgram = BD.Program;
|
||||
|
||||
BD.Program = ParseInputFile(PrefixOutput);
|
||||
BD.Program = ParseInputFile(PrefixOutput.toString());
|
||||
if (BD.Program == 0) {
|
||||
std::cerr << BD.getToolName() << ": Error reading bytecode file '"
|
||||
<< PrefixOutput << "'!\n";
|
||||
exit(1);
|
||||
}
|
||||
removeFile(PrefixOutput);
|
||||
PrefixOutput.destroyFile();
|
||||
}
|
||||
|
||||
std::cout << "Checking to see if these passes crash: "
|
||||
|
||||
Reference in New Issue
Block a user