From 90c7f1cc161769853db72e30e76c34b0e4ddf3da Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 24 Feb 2014 18:20:12 +0000 Subject: 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 :-) llvm-svn: 202052 --- llvm/lib/Transforms/Instrumentation/DebugIR.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Instrumentation/DebugIR.cpp') diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp index 1100689fb7e..f552bbffc0f 100644 --- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp +++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp @@ -528,7 +528,7 @@ void DebugIR::writeDebugBitcode(const Module *M, int *fd) { if (!fd) { std::string Path = getPath(); - Out.reset(new raw_fd_ostream(Path.c_str(), error, sys::fs::F_None)); + Out.reset(new raw_fd_ostream(Path.c_str(), error, sys::fs::F_Text)); DEBUG(dbgs() << "WRITING debug bitcode from Module " << M << " to file " << Path << "\n"); } else { -- cgit v1.2.3