Deleted Added
full compact
ExecutionDriver.cpp (218885) ExecutionDriver.cpp (221337)
1//===- ExecutionDriver.cpp - Allow execution of LLVM program --------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 309 unchanged lines hidden (view full) ---

318 }
319 if (writeProgramToFile(BitcodeFile.str(), M)) {
320 errs() << ToolName << ": Error emitting bitcode to file '"
321 << BitcodeFile.str() << "'!\n";
322 exit(1);
323 }
324
325 // Remove the temporary bitcode file when we are done.
1//===- ExecutionDriver.cpp - Allow execution of LLVM program --------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 309 unchanged lines hidden (view full) ---

318 }
319 if (writeProgramToFile(BitcodeFile.str(), M)) {
320 errs() << ToolName << ": Error emitting bitcode to file '"
321 << BitcodeFile.str() << "'!\n";
322 exit(1);
323 }
324
325 // Remove the temporary bitcode file when we are done.
326 FileRemover BitcodeFileRemover(BitcodeFile, !SaveTemps);
326 FileRemover BitcodeFileRemover(BitcodeFile.str(), !SaveTemps);
327
328 // Actually compile the program!
329 Interpreter->compileProgram(BitcodeFile.str(), Error, Timeout, MemoryLimit);
330}
331
332
333/// executeProgram - This method runs "Program", capturing the output of the
334/// program to a file, returning the filename of the file. A recommended

--- 24 unchanged lines hidden (view full) ---

359 << BitcodeFile << "'!\n";
360 exit(1);
361 }
362 CreatedBitcode = true;
363 }
364
365 // Remove the temporary bitcode file when we are done.
366 sys::Path BitcodePath(BitcodeFile);
327
328 // Actually compile the program!
329 Interpreter->compileProgram(BitcodeFile.str(), Error, Timeout, MemoryLimit);
330}
331
332
333/// executeProgram - This method runs "Program", capturing the output of the
334/// program to a file, returning the filename of the file. A recommended

--- 24 unchanged lines hidden (view full) ---

359 << BitcodeFile << "'!\n";
360 exit(1);
361 }
362 CreatedBitcode = true;
363 }
364
365 // Remove the temporary bitcode file when we are done.
366 sys::Path BitcodePath(BitcodeFile);
367 FileRemover BitcodeFileRemover(BitcodePath, CreatedBitcode && !SaveTemps);
367 FileRemover BitcodeFileRemover(BitcodePath.str(),
368 CreatedBitcode && !SaveTemps);
368
369 if (OutputFile.empty()) OutputFile = OutputPrefix + "-execution-output";
370
371 // Check to see if this is a valid output filename...
372 sys::Path uniqueFile(OutputFile);
373 if (uniqueFile.makeUnique(true, &ErrMsg)) {
374 errs() << ToolName << ": Error making unique filename: "
375 << ErrMsg << "\n";

--- 140 unchanged lines hidden ---
369
370 if (OutputFile.empty()) OutputFile = OutputPrefix + "-execution-output";
371
372 // Check to see if this is a valid output filename...
373 sys::Path uniqueFile(OutputFile);
374 if (uniqueFile.makeUnique(true, &ErrMsg)) {
375 errs() << ToolName << ": Error making unique filename: "
376 << ErrMsg << "\n";

--- 140 unchanged lines hidden ---