diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-24 18:20:12 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-24 18:20:12 +0000 |
commit | ac69459e0fe3df04788f5adcb94b1bec8b8cf8ad (patch) | |
tree | 6260ace05d8d32042f39b42aead973d7c3ebaf9a /lib/Transforms | |
parent | 137342f198093f68e112cd979782fae27bbb22ab (diff) | |
download | llvm-ac69459e0fe3df04788f5adcb94b1bec8b8cf8ad.tar.gz llvm-ac69459e0fe3df04788f5adcb94b1bec8b8cf8ad.tar.bz2 llvm-ac69459e0fe3df04788f5adcb94b1bec8b8cf8ad.tar.xz |
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
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Instrumentation/DebugIR.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/DebugIR.cpp b/lib/Transforms/Instrumentation/DebugIR.cpp index 1100689fb7..f552bbffc0 100644 --- a/lib/Transforms/Instrumentation/DebugIR.cpp +++ b/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 { diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 0929142108..8a3d5ea2db 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -466,7 +466,7 @@ void GCOVProfiler::emitProfileNotes() { DICompileUnit CU(CU_Nodes->getOperand(i)); std::string ErrorInfo; raw_fd_ostream out(mangleName(CU, "gcno").c_str(), ErrorInfo, - sys::fs::F_Binary); + sys::fs::F_None); std::string EdgeDestinations; DIArray SPs = CU.getSubprograms(); |