forked from OSchip/llvm-project
Write temporary file names if debugging is enabled.
llvm-svn: 195062
This commit is contained in:
parent
db3d8554be
commit
265134c731
|
@ -14,6 +14,7 @@
|
||||||
#include "lld/ReaderWriter/Simple.h"
|
#include "lld/ReaderWriter/Simple.h"
|
||||||
#include "lld/ReaderWriter/Writer.h"
|
#include "lld/ReaderWriter/Writer.h"
|
||||||
|
|
||||||
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
using namespace lld;
|
using namespace lld;
|
||||||
|
@ -27,6 +28,9 @@ void RoundTripNativePass::perform(std::unique_ptr<MutableFile> &mergedFile) {
|
||||||
StringRef outFile = llvm::sys::path::filename(_context.outputPath());
|
StringRef outFile = llvm::sys::path::filename(_context.outputPath());
|
||||||
if (llvm::sys::fs::createTemporaryFile(outFile, "native", tmpNativeFile))
|
if (llvm::sys::fs::createTemporaryFile(outFile, "native", tmpNativeFile))
|
||||||
return;
|
return;
|
||||||
|
DEBUG_WITH_TYPE("RoundTripNativePass", {
|
||||||
|
llvm::dbgs() << "RoundTripNativePass: " << tmpNativeFile << "\n";
|
||||||
|
});
|
||||||
|
|
||||||
// The file that is written would be kept around if there is a problem
|
// The file that is written would be kept around if there is a problem
|
||||||
// writing to the file or when reading atoms back from the file.
|
// writing to the file or when reading atoms back from the file.
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "lld/ReaderWriter/Simple.h"
|
#include "lld/ReaderWriter/Simple.h"
|
||||||
#include "lld/ReaderWriter/Writer.h"
|
#include "lld/ReaderWriter/Writer.h"
|
||||||
|
|
||||||
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/Path.h"
|
#include "llvm/Support/Path.h"
|
||||||
|
|
||||||
// Skip YAML files larger than this to avoid OOM error. The YAML reader consumes
|
// Skip YAML files larger than this to avoid OOM error. The YAML reader consumes
|
||||||
|
@ -31,6 +32,9 @@ void RoundTripYAMLPass::perform(std::unique_ptr<MutableFile> &mergedFile) {
|
||||||
StringRef outFile = llvm::sys::path::filename(_context.outputPath());
|
StringRef outFile = llvm::sys::path::filename(_context.outputPath());
|
||||||
if (llvm::sys::fs::createTemporaryFile(outFile, "yaml", tmpYAMLFile))
|
if (llvm::sys::fs::createTemporaryFile(outFile, "yaml", tmpYAMLFile))
|
||||||
return;
|
return;
|
||||||
|
DEBUG_WITH_TYPE("RoundTripYAMLPass", {
|
||||||
|
llvm::dbgs() << "RoundTripYAMLPass: " << tmpYAMLFile << "\n";
|
||||||
|
});
|
||||||
|
|
||||||
// The file that is written would be kept around if there is a problem
|
// The file that is written would be kept around if there is a problem
|
||||||
// writing to the file or when reading atoms back from the file.
|
// writing to the file or when reading atoms back from the file.
|
||||||
|
|
Loading…
Reference in New Issue