mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-30 14:50:30 +00:00
[tools] Mark output of tools as text if it is really text
This is a continuation of https://reviews.llvm.org/D67696. The following tools also need to set the OF_Text flag correctly. - llvm-profdata - llvm-link Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D94313
This commit is contained in:
parent
5ed102c708
commit
96ca3dd89b
@ -27,5 +27,5 @@ Roundtrip test:
|
||||
|
||||
RUN: llvm-profdata merge -o %t.0.profdata %S/Inputs/CSIR_profile.proftext
|
||||
RUN: llvm-profdata merge -text -o %t.0.proftext %t.0.profdata
|
||||
RUN: diff %t.0.proftext %S/Inputs/CSIR_profile.proftext
|
||||
RUN: diff -b %t.0.proftext %S/Inputs/CSIR_profile.proftext
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
; RUN: llvm-profdata merge -text %S/Inputs/instr-remap.proftext -r %S/Inputs/instr-remap.remap -o %t.output
|
||||
; RUN: diff %S/Inputs/instr-remap.expected %t.output
|
||||
; RUN: diff -b %S/Inputs/instr-remap.expected %t.output
|
||||
|
@ -456,7 +456,8 @@ int main(int argc, char **argv) {
|
||||
errs() << "Here's the assembly:\n" << *Composite;
|
||||
|
||||
std::error_code EC;
|
||||
ToolOutputFile Out(OutputFilename, EC, sys::fs::OF_None);
|
||||
ToolOutputFile Out(OutputFilename, EC,
|
||||
OutputAssembly ? sys::fs::OF_Text : sys::fs::OF_None);
|
||||
if (EC) {
|
||||
WithColor::error() << EC.message() << '\n';
|
||||
return 1;
|
||||
|
@ -296,7 +296,9 @@ static void writeInstrProfile(StringRef OutputFilename,
|
||||
ProfileFormat OutputFormat,
|
||||
InstrProfWriter &Writer) {
|
||||
std::error_code EC;
|
||||
raw_fd_ostream Output(OutputFilename.data(), EC, sys::fs::OF_None);
|
||||
raw_fd_ostream Output(OutputFilename.data(), EC,
|
||||
OutputFormat == PF_Text ? sys::fs::OF_Text
|
||||
: sys::fs::OF_None);
|
||||
if (EC)
|
||||
exitWithErrorCode(EC, OutputFilename);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user