mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-10 04:33:40 +00:00
Don't make F_None the default.
This will make it easier to switch the default to being binary files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
281d7fc2d9
commit
843efd49b7
@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
errs() << "Writing '" << Filename << "'...";
|
errs() << "Writing '" << Filename << "'...";
|
||||||
|
|
||||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo);
|
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
|
||||||
std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
|
std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
|
||||||
std::string Title = GraphName + " for '" + F.getName().str() + "' function";
|
std::string Title = GraphName + " for '" + F.getName().str() + "' function";
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ public:
|
|||||||
|
|
||||||
errs() << "Writing '" << Filename << "'...";
|
errs() << "Writing '" << Filename << "'...";
|
||||||
|
|
||||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo);
|
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
|
||||||
std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);
|
std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);
|
||||||
|
|
||||||
if (ErrorInfo.empty())
|
if (ErrorInfo.empty())
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
/// tool_output_file - This constructor's arguments are passed to
|
/// tool_output_file - This constructor's arguments are passed to
|
||||||
/// to raw_fd_ostream's constructor.
|
/// to raw_fd_ostream's constructor.
|
||||||
tool_output_file(const char *filename, std::string &ErrorInfo,
|
tool_output_file(const char *filename, std::string &ErrorInfo,
|
||||||
sys::fs::OpenFlags Flags = sys::fs::F_None);
|
sys::fs::OpenFlags Flags);
|
||||||
|
|
||||||
tool_output_file(const char *Filename, int FD);
|
tool_output_file(const char *Filename, int FD);
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ public:
|
|||||||
/// file descriptor when it is done (this is necessary to detect
|
/// file descriptor when it is done (this is necessary to detect
|
||||||
/// output errors).
|
/// output errors).
|
||||||
raw_fd_ostream(const char *Filename, std::string &ErrorInfo,
|
raw_fd_ostream(const char *Filename, std::string &ErrorInfo,
|
||||||
sys::fs::OpenFlags Flags = sys::fs::F_None);
|
sys::fs::OpenFlags Flags);
|
||||||
|
|
||||||
/// raw_fd_ostream ctor - FD is the file descriptor that this writes to. If
|
/// raw_fd_ostream ctor - FD is the file descriptor that this writes to. If
|
||||||
/// ShouldClose is true, this closes the file when the stream is destroyed.
|
/// ShouldClose is true, this closes the file when the stream is destroyed.
|
||||||
|
@ -80,7 +80,7 @@ namespace {
|
|||||||
errs() << "Writing '" << Filename << "'...";
|
errs() << "Writing '" << Filename << "'...";
|
||||||
|
|
||||||
std::string ErrorInfo;
|
std::string ErrorInfo;
|
||||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo);
|
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
|
||||||
|
|
||||||
if (ErrorInfo.empty())
|
if (ErrorInfo.empty())
|
||||||
WriteGraph(File, (const Function*)&F);
|
WriteGraph(File, (const Function*)&F);
|
||||||
@ -114,7 +114,7 @@ namespace {
|
|||||||
errs() << "Writing '" << Filename << "'...";
|
errs() << "Writing '" << Filename << "'...";
|
||||||
|
|
||||||
std::string ErrorInfo;
|
std::string ErrorInfo;
|
||||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo);
|
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
|
||||||
|
|
||||||
if (ErrorInfo.empty())
|
if (ErrorInfo.empty())
|
||||||
WriteGraph(File, (const Function*)&F, true);
|
WriteGraph(File, (const Function*)&F, true);
|
||||||
|
@ -595,7 +595,7 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
rs << round;
|
rs << round;
|
||||||
std::string graphFileName(fqn + "." + rs.str() + ".pbqpgraph");
|
std::string graphFileName(fqn + "." + rs.str() + ".pbqpgraph");
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
raw_fd_ostream os(graphFileName.c_str(), tmp);
|
raw_fd_ostream os(graphFileName.c_str(), tmp, sys::fs::F_None);
|
||||||
DEBUG(dbgs() << "Dumping graph for round " << round << " to \""
|
DEBUG(dbgs() << "Dumping graph for round " << round << " to \""
|
||||||
<< graphFileName << "\"\n");
|
<< graphFileName << "\"\n");
|
||||||
problem->getGraph().dump(os);
|
problem->getGraph().dump(os);
|
||||||
|
@ -130,7 +130,7 @@ void LLVMDumpModule(LLVMModuleRef M) {
|
|||||||
LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
|
LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
|
||||||
char **ErrorMessage) {
|
char **ErrorMessage) {
|
||||||
std::string error;
|
std::string error;
|
||||||
raw_fd_ostream dest(Filename, error);
|
raw_fd_ostream dest(Filename, error, sys::fs::F_None);
|
||||||
if (!error.empty()) {
|
if (!error.empty()) {
|
||||||
*ErrorMessage = strdup(error.c_str());
|
*ErrorMessage = strdup(error.c_str());
|
||||||
return true;
|
return true;
|
||||||
|
@ -482,7 +482,7 @@ void FileInfo::print(StringRef GCNOFile, StringRef GCDAFile) {
|
|||||||
std::string CoveragePath = mangleCoveragePath(Filename,
|
std::string CoveragePath = mangleCoveragePath(Filename,
|
||||||
Options.PreservePaths);
|
Options.PreservePaths);
|
||||||
std::string ErrorInfo;
|
std::string ErrorInfo;
|
||||||
raw_fd_ostream OS(CoveragePath.c_str(), ErrorInfo);
|
raw_fd_ostream OS(CoveragePath.c_str(), ErrorInfo, sys::fs::F_None);
|
||||||
if (!ErrorInfo.empty())
|
if (!ErrorInfo.empty())
|
||||||
errs() << ErrorInfo << "\n";
|
errs() << ErrorInfo << "\n";
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
std::string Error;
|
std::string Error;
|
||||||
tool_output_file DepOut(DependFilename.c_str(), Error);
|
tool_output_file DepOut(DependFilename.c_str(), Error, sys::fs::F_None);
|
||||||
if (!Error.empty()) {
|
if (!Error.empty()) {
|
||||||
errs() << argv0 << ": error opening " << DependFilename
|
errs() << argv0 << ": error opening " << DependFilename
|
||||||
<< ":" << Error << "\n";
|
<< ":" << Error << "\n";
|
||||||
@ -103,7 +103,7 @@ int TableGenMain(char *argv0, TableGenMainFn *MainFn) {
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
std::string Error;
|
std::string Error;
|
||||||
tool_output_file Out(OutputFilename.c_str(), Error);
|
tool_output_file Out(OutputFilename.c_str(), Error, sys::fs::F_None);
|
||||||
if (!Error.empty()) {
|
if (!Error.empty()) {
|
||||||
errs() << argv0 << ": error opening " << OutputFilename
|
errs() << argv0 << ": error opening " << OutputFilename
|
||||||
<< ":" << Error << "\n";
|
<< ":" << Error << "\n";
|
||||||
|
@ -528,7 +528,7 @@ void DebugIR::writeDebugBitcode(const Module *M, int *fd) {
|
|||||||
|
|
||||||
if (!fd) {
|
if (!fd) {
|
||||||
std::string Path = getPath();
|
std::string Path = getPath();
|
||||||
Out.reset(new raw_fd_ostream(Path.c_str(), error));
|
Out.reset(new raw_fd_ostream(Path.c_str(), error, sys::fs::F_None));
|
||||||
DEBUG(dbgs() << "WRITING debug bitcode from Module " << M << " to file "
|
DEBUG(dbgs() << "WRITING debug bitcode from Module " << M << " to file "
|
||||||
<< Path << "\n");
|
<< Path << "\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -192,7 +192,7 @@ static void emitDOTFile(const char *FileName, const MCFunction &f,
|
|||||||
MCInstPrinter *IP) {
|
MCInstPrinter *IP) {
|
||||||
// Start a new dot file.
|
// Start a new dot file.
|
||||||
std::string Error;
|
std::string Error;
|
||||||
raw_fd_ostream Out(FileName, Error);
|
raw_fd_ostream Out(FileName, Error, sys::fs::F_None);
|
||||||
if (!Error.empty()) {
|
if (!Error.empty()) {
|
||||||
errs() << "llvm-objdump: warning: " << Error << '\n';
|
errs() << "llvm-objdump: warning: " << Error << '\n';
|
||||||
return;
|
return;
|
||||||
@ -373,7 +373,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
|||||||
}
|
}
|
||||||
if (!YAMLCFG.empty()) {
|
if (!YAMLCFG.empty()) {
|
||||||
std::string Error;
|
std::string Error;
|
||||||
raw_fd_ostream YAMLOut(YAMLCFG.c_str(), Error);
|
raw_fd_ostream YAMLOut(YAMLCFG.c_str(), Error, sys::fs::F_None);
|
||||||
if (!Error.empty()) {
|
if (!Error.empty()) {
|
||||||
errs() << ToolName << ": warning: " << Error << '\n';
|
errs() << ToolName << ": warning: " << Error << '\n';
|
||||||
return;
|
return;
|
||||||
|
@ -112,7 +112,7 @@ int main(int argc, char **argv) {
|
|||||||
OutputFilename = "-";
|
OutputFilename = "-";
|
||||||
|
|
||||||
std::string ErrorInfo;
|
std::string ErrorInfo;
|
||||||
raw_fd_ostream Output(OutputFilename.data(), ErrorInfo);
|
raw_fd_ostream Output(OutputFilename.data(), ErrorInfo, sys::fs::F_None);
|
||||||
if (!ErrorInfo.empty())
|
if (!ErrorInfo.empty())
|
||||||
exitWithError(ErrorInfo, OutputFilename);
|
exitWithError(ErrorInfo, OutputFilename);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user