mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Replace the F_Binary flag with a F_Text one.
After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
errs() << "Writing '" << Filename << "'...";
|
||||
|
||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
|
||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_Text);
|
||||
std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
|
||||
std::string Title = GraphName + " for '" + F.getName().str() + "' function";
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
|
||||
errs() << "Writing '" << Filename << "'...";
|
||||
|
||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_None);
|
||||
raw_fd_ostream File(Filename.c_str(), ErrorInfo, sys::fs::F_Text);
|
||||
std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);
|
||||
|
||||
if (ErrorInfo.empty())
|
||||
|
||||
@@ -578,9 +578,9 @@ enum OpenFlags {
|
||||
/// with F_Excl.
|
||||
F_Append = 2,
|
||||
|
||||
/// F_Binary - The file should be opened in binary mode on platforms that
|
||||
/// make this distinction.
|
||||
F_Binary = 4,
|
||||
/// The file should be opened in text mode on platforms that make this
|
||||
/// distinction.
|
||||
F_Text = 4,
|
||||
|
||||
/// Open the file for read and write.
|
||||
F_RW = 8
|
||||
|
||||
Reference in New Issue
Block a user