mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -49,20 +49,28 @@ namespace {
|
||||
/// writeProgramToFile - This writes the current "Program" to the named bitcode
|
||||
/// file. If an error occurs, true is returned.
|
||||
///
|
||||
static bool writeProgramToFileAux(tool_output_file &Out, const Module *M) {
|
||||
WriteBitcodeToFile(M, Out.os());
|
||||
Out.os().close();
|
||||
if (!Out.os().has_error()) {
|
||||
Out.keep();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BugDriver::writeProgramToFile(const std::string &Filename, int FD,
|
||||
const Module *M) const {
|
||||
tool_output_file Out(Filename.c_str(), FD);
|
||||
return writeProgramToFileAux(Out, M);
|
||||
}
|
||||
|
||||
bool BugDriver::writeProgramToFile(const std::string &Filename,
|
||||
const Module *M) const {
|
||||
std::string ErrInfo;
|
||||
tool_output_file Out(Filename.c_str(), ErrInfo,
|
||||
raw_fd_ostream::F_Binary);
|
||||
if (ErrInfo.empty()) {
|
||||
WriteBitcodeToFile(M, Out.os());
|
||||
Out.os().close();
|
||||
if (!Out.os().has_error()) {
|
||||
Out.keep();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Out.os().clear_error();
|
||||
tool_output_file Out(Filename.c_str(), ErrInfo, raw_fd_ostream::F_Binary);
|
||||
if (ErrInfo.empty())
|
||||
return writeProgramToFileAux(Out, M);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user