diff options
author | Kai Nacke <kai.nacke@redstar.de> | 2019-10-08 08:21:20 +0000 |
---|---|---|
committer | Kai Nacke <kai.nacke@redstar.de> | 2019-10-08 08:21:20 +0000 |
commit | c9ddda84052659698b921e6c3a5bf7df9df599ce (patch) | |
tree | 4953dbeb6c12adf8534e0313b1cac53ffeb15ac7 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | d2e9dd3877e903812ed5568e3a59e9e124ca4f85 (diff) | |
download | bcm5719-llvm-c9ddda84052659698b921e6c3a5bf7df9df599ce.tar.gz bcm5719-llvm-c9ddda84052659698b921e6c3a5bf7df9df599ce.zip |
[Tools] Mark output of tools as text if it is text
Several LLVM tools write text files/streams without using OF_Text.
This can cause problems on platforms which distinguish between
text and binary output. This PR adds the OF_Text flag for the
following tools:
- llvm-dis
- llvm-dwarfdump
- llvm-mca
- llvm-mc (assembler files only)
- opt (assembler files only)
- RemarkStreamer (used e.g. by opt)
Reviewers: rnk, vivekvpandya, Bigcheese, andreadb
Differential Revision: https://reviews.llvm.org/D67696
llvm-svn: 374024
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index 05a7aef67ec..e20f6041f98 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -584,7 +584,7 @@ int main(int argc, char **argv) { } std::error_code EC; - ToolOutputFile OutputFile(OutputFilename, EC, sys::fs::OF_None); + ToolOutputFile OutputFile(OutputFilename, EC, sys::fs::OF_Text); error("Unable to open output file" + OutputFilename, EC); // Don't remove output file if we exit with an error. OutputFile.keep(); |