llvm.org GIT mirror llvm / e153fb3
ProfileData: Add support for the indexed instrprof format This adds support for an indexed instrumentation based profiling format, which is just a small header and an on disk hash table. This format will be used by clang's -fprofile-instr-use= for PGO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206656 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Bogner 6 years ago
10 changed file(s) with 377 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
2828 bad_magic,
2929 bad_header,
3030 unsupported_version,
31 unsupported_hash_type,
3132 too_large,
3233 truncated,
3334 malformed,
1515 #define LLVM_PROFILEDATA_INSTRPROF_READER_H_
1616
1717 #include "llvm/ADT/ArrayRef.h"
18 #include "llvm/ADT/StringExtras.h"
1819 #include "llvm/ProfileData/InstrProf.h"
1920 #include "llvm/Support/LineIterator.h"
2021 #include "llvm/Support/MemoryBuffer.h"
21 #include "llvm/Support/Endian.h"
22 #include "llvm/Support/EndianStream.h"
23 #include "llvm/Support/OnDiskHashTable.h"
2224
2325 #include
2426
2830
2931 /// Profiling information for a single function.
3032 struct InstrProfRecord {
33 InstrProfRecord() {}
34 InstrProfRecord(StringRef Name, uint64_t Hash, ArrayRef Counts)
35 : Name(Name), Hash(Hash), Counts(Counts) {}
3136 StringRef Name;
3237 uint64_t Hash;
3338 ArrayRef Counts;
190195 typedef RawInstrProfReader RawInstrProfReader32;
191196 typedef RawInstrProfReader RawInstrProfReader64;
192197
198 namespace IndexedInstrProf {
199 enum class HashT : uint32_t;
200 uint64_t ComputeHash(HashT Type, StringRef K);
201 }
202
203 /// Trait for lookups into the on-disk hash table for the binary instrprof
204 /// format.
205 class InstrProfLookupTrait {
206 std::vector CountBuffer;
207 IndexedInstrProf::HashT HashType;
208 public:
209 InstrProfLookupTrait(IndexedInstrProf::HashT HashType) : HashType(HashType) {}
210
211 typedef InstrProfRecord data_type;
212 typedef StringRef internal_key_type;
213 typedef StringRef external_key_type;
214 typedef uint64_t hash_value_type;
215 typedef uint64_t offset_type;
216
217 static bool EqualKey(StringRef A, StringRef B) { return A == B; }
218 static StringRef GetInternalKey(StringRef K) { return K; }
219
220 hash_value_type ComputeHash(StringRef K) {
221 return IndexedInstrProf::ComputeHash(HashType, K);
222 }
223
224 static std::pair
225 ReadKeyDataLength(const unsigned char *&D) {
226 using namespace support;
227 return std::make_pair(endian::readNext(D),
228 endian::readNext(D));
229 }
230
231 StringRef ReadKey(const unsigned char *D, unsigned N) {
232 return StringRef((const char *)D, N);
233 }
234
235 InstrProfRecord ReadData(StringRef K, const unsigned char *D, unsigned N) {
236 if (N < 2 * sizeof(uint64_t) || N % sizeof(uint64_t)) {
237 // The data is corrupt, don't try to read it.
238 CountBuffer.clear();
239 return InstrProfRecord("", 0, CountBuffer);
240 }
241
242 using namespace support;
243
244 // The first stored value is the hash.
245 uint64_t Hash = endian::readNext(D);
246 // Each counter follows.
247 unsigned NumCounters = N / sizeof(uint64_t) - 1;
248 CountBuffer.clear();
249 CountBuffer.reserve(NumCounters - 1);
250 for (unsigned I = 0; I < NumCounters; ++I)
251 CountBuffer.push_back(endian::readNext(D));
252
253 return InstrProfRecord(K, Hash, CountBuffer);
254 }
255 };
256 typedef OnDiskIterableChainedHashTable
257 InstrProfReaderIndex;
258
259 /// Reader for the indexed binary instrprof format.
260 class IndexedInstrProfReader : public InstrProfReader {
261 private:
262 /// The profile data file contents.
263 std::unique_ptr DataBuffer;
264 /// The index into the profile data.
265 std::unique_ptr Index;
266 /// Iterator over the profile data.
267 InstrProfReaderIndex::data_iterator RecordIterator;
268 /// The maximal execution count among all fucntions.
269 uint64_t MaxFunctionCount;
270
271 IndexedInstrProfReader(const IndexedInstrProfReader &) LLVM_DELETED_FUNCTION;
272 IndexedInstrProfReader &operator=(const IndexedInstrProfReader &)
273 LLVM_DELETED_FUNCTION;
274 public:
275 IndexedInstrProfReader(std::unique_ptr DataBuffer)
276 : DataBuffer(std::move(DataBuffer)), Index(nullptr),
277 RecordIterator(InstrProfReaderIndex::data_iterator()) {}
278
279 /// Return true if the given buffer is in an indexed instrprof format.
280 static bool hasFormat(const MemoryBuffer &DataBuffer);
281
282 /// Read the file header.
283 error_code readHeader() override;
284 /// Read a single record.
285 error_code readNextRecord(InstrProfRecord &Record) override;
286
287 /// Fill Counts with the profile data for the given function name.
288 error_code getFunctionCounts(StringRef FuncName, uint64_t &FuncHash,
289 std::vector &Counts);
290 /// Return the maximum of all known function counts.
291 uint64_t getMaximumFunctionCount() { return MaxFunctionCount; }
292
293 /// Factory method to create an indexed reader.
294 static error_code create(std::string Path,
295 std::unique_ptr &Result);
296 };
297
193298 } // end namespace llvm
194299
195300 #endif // LLVM_PROFILEDATA_INSTRPROF_READER_H_
4040 error_code addFunctionCounts(StringRef FunctionName, uint64_t FunctionHash,
4141 ArrayRef Counters);
4242 /// Ensure that all data is written to disk.
43 void write(raw_ostream &OS);
43 void write(raw_fd_ostream &OS);
4444 };
4545
4646 } // end namespace llvm
3232 return "Invalid header";
3333 case instrprof_error::unsupported_version:
3434 return "Unsupported format version";
35 case instrprof_error::unsupported_hash_type:
36 return "Unsupported hash function";
3537 case instrprof_error::too_large:
3638 return "Too much profile data";
3739 case instrprof_error::truncated:
0 //=-- InstrProfIndexed.h - Indexed profiling format support -------*- C++ -*-=//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Shared header for the instrumented profile data reader and writer.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_PROFILEDATA_INSTRPROF_INDEXED_H_
14 #define LLVM_PROFILEDATA_INSTRPROF_INDEXED_H_
15
16 #include "llvm/Support/MD5.h"
17
18 namespace llvm {
19
20 namespace IndexedInstrProf {
21 enum class HashT : uint32_t {
22 MD5,
23
24 Last = MD5
25 };
26
27 static inline uint64_t MD5Hash(StringRef Str) {
28 MD5 Hash;
29 Hash.update(Str);
30 llvm::MD5::MD5Result Result;
31 Hash.final(Result);
32 // Return the least significant 8 bytes. Our MD5 implementation returns the
33 // result in little endian, so we may need to swap bytes.
34 using namespace llvm::support;
35 return endian::read(Result);
36 }
37
38 uint64_t ComputeHash(HashT Type, StringRef K) {
39 switch (Type) {
40 case HashT::MD5:
41 return IndexedInstrProf::MD5Hash(K);
42 }
43 llvm_unreachable("Unhandled hash type");
44 }
45
46 const uint64_t Magic = 0x8169666f72706cff; // "\xfflprofi\x81"
47 const uint64_t Version = 1;
48 const HashT HashType = HashT::MD5;
49 }
50
51 } // end namespace llvm
52
53 #endif // LLVM_PROFILEDATA_INSTRPROF_INDEXED_H_
1414 #include "llvm/ProfileData/InstrProfReader.h"
1515 #include "llvm/ProfileData/InstrProf.h"
1616
17 #include "InstrProfIndexed.h"
18
1719 #include
1820
1921 using namespace llvm;
2022
21 error_code InstrProfReader::create(std::string Path,
22 std::unique_ptr &Result) {
23 std::unique_ptr Buffer;
23 static error_code setupMemoryBuffer(std::string Path,
24 std::unique_ptr &Buffer) {
2425 if (error_code EC = MemoryBuffer::getFileOrSTDIN(Path, Buffer))
2526 return EC;
2627
2728 // Sanity check the file.
2829 if (Buffer->getBufferSize() > std::numeric_limits::max())
2930 return instrprof_error::too_large;
31 return instrprof_error::success;
32 }
33
34 static error_code initializeReader(InstrProfReader &Reader) {
35 return Reader.readHeader();
36 }
37
38 error_code InstrProfReader::create(std::string Path,
39 std::unique_ptr &Result) {
40 // Set up the buffer to read.
41 std::unique_ptr Buffer;
42 if (error_code EC = setupMemoryBuffer(Path, Buffer))
43 return EC;
3044
3145 // Create the reader.
32 if (RawInstrProfReader64::hasFormat(*Buffer))
46 if (IndexedInstrProfReader::hasFormat(*Buffer))
47 Result.reset(new IndexedInstrProfReader(std::move(Buffer)));
48 else if (RawInstrProfReader64::hasFormat(*Buffer))
3349 Result.reset(new RawInstrProfReader64(std::move(Buffer)));
3450 else if (RawInstrProfReader32::hasFormat(*Buffer))
3551 Result.reset(new RawInstrProfReader32(std::move(Buffer)));
3652 else
3753 Result.reset(new TextInstrProfReader(std::move(Buffer)));
3854
39 // Read the header and return the result.
40 return Result->readHeader();
55 // Initialize the reader and return the result.
56 return initializeReader(*Result);
57 }
58
59 error_code IndexedInstrProfReader::create(
60 std::string Path, std::unique_ptr &Result) {
61 // Set up the buffer to read.
62 std::unique_ptr Buffer;
63 if (error_code EC = setupMemoryBuffer(Path, Buffer))
64 return EC;
65
66 // Create the reader.
67 if (!IndexedInstrProfReader::hasFormat(*Buffer))
68 return instrprof_error::bad_magic;
69 Result.reset(new IndexedInstrProfReader(std::move(Buffer)));
70
71 // Initialize the reader and return the result.
72 return initializeReader(*Result);
4173 }
4274
4375 void InstrProfIterator::Increment() {
209241 template class RawInstrProfReader;
210242 template class RawInstrProfReader;
211243 }
244
245 bool IndexedInstrProfReader::hasFormat(const MemoryBuffer &DataBuffer) {
246 if (DataBuffer.getBufferSize() < 8)
247 return false;
248 using namespace support;
249 uint64_t Magic =
250 endian::read(DataBuffer.getBufferStart());
251 return Magic == IndexedInstrProf::Magic;
252 }
253
254 error_code IndexedInstrProfReader::readHeader() {
255 const unsigned char *Start = (unsigned char *)DataBuffer->getBufferStart();
256 const unsigned char *Cur = Start;
257 if ((unsigned char *)DataBuffer->getBufferEnd() - Cur < 24)
258 return error(instrprof_error::truncated);
259
260 using namespace support;
261
262 // Check the magic number.
263 uint64_t Magic = endian::readNext(Cur);
264 if (Magic != IndexedInstrProf::Magic)
265 return error(instrprof_error::bad_magic);
266
267 // Read the version.
268 uint64_t Version = endian::readNext(Cur);
269 if (Version != IndexedInstrProf::Version)
270 return error(instrprof_error::unsupported_version);
271
272 // Read the maximal function count.
273 MaxFunctionCount = endian::readNext(Cur);
274
275 // Read the hash type and start offset.
276 IndexedInstrProf::HashT HashType = static_cast(
277 endian::readNext(Cur));
278 if (HashType > IndexedInstrProf::HashT::Last)
279 return error(instrprof_error::unsupported_hash_type);
280 uint64_t HashOffset = endian::readNext(Cur);
281
282 // The rest of the file is an on disk hash table.
283 Index.reset(InstrProfReaderIndex::Create(Start + HashOffset, Cur, Start,
284 InstrProfLookupTrait(HashType)));
285 // Set up our iterator for readNextRecord.
286 RecordIterator = Index->data_begin();
287
288 return success();
289 }
290
291 error_code IndexedInstrProfReader::getFunctionCounts(
292 StringRef FuncName, uint64_t &FuncHash, std::vector &Counts) {
293 const auto &Iter = Index->find(FuncName);
294 if (Iter == Index->end())
295 return error(instrprof_error::unknown_function);
296
297 // Found it. Make sure it's valid before giving back a result.
298 const InstrProfRecord &Record = *Iter;
299 if (Record.Name.empty())
300 return error(instrprof_error::malformed);
301 FuncHash = Record.Hash;
302 Counts = Record.Counts;
303 return success();
304 }
305
306 error_code IndexedInstrProfReader::readNextRecord(InstrProfRecord &Record) {
307 // Are we out of records?
308 if (RecordIterator == Index->data_end())
309 return error(instrprof_error::eof);
310
311 // Read the next one.
312 Record = *RecordIterator;
313 ++RecordIterator;
314 if (Record.Name.empty())
315 return error(instrprof_error::malformed);
316 return success();
317 }
1212 //===----------------------------------------------------------------------===//
1313
1414 #include "llvm/ProfileData/InstrProfWriter.h"
15 #include "llvm/Support/Endian.h"
15 #include "llvm/ADT/StringExtras.h"
16 #include "llvm/Support/EndianStream.h"
17 #include "llvm/Support/OnDiskHashTable.h"
18
19 #include "InstrProfIndexed.h"
1620
1721 using namespace llvm;
22
23 namespace {
24 class InstrProfRecordTrait {
25 public:
26 typedef StringRef key_type;
27 typedef StringRef key_type_ref;
28
29 typedef InstrProfWriter::CounterData data_type;
30 typedef const InstrProfWriter::CounterData &data_type_ref;
31
32 typedef uint64_t hash_value_type;
33 typedef uint64_t offset_type;
34
35 static hash_value_type ComputeHash(key_type_ref K) {
36 return IndexedInstrProf::ComputeHash(IndexedInstrProf::HashType, K);
37 }
38
39 static std::pair
40 EmitKeyDataLength(raw_ostream &Out, key_type_ref K, data_type_ref V) {
41 using namespace llvm::support;
42 endian::Writer LE(Out);
43
44 unsigned N = K.size();
45 LE.write(N);
46
47 unsigned M = (1 + V.Counts.size()) * sizeof(uint64_t);
48 LE.write(M);
49
50 return std::make_pair(N, M);
51 }
52
53 static void EmitKey(raw_ostream &Out, key_type_ref K, unsigned N){
54 Out.write(K.data(), N);
55 }
56
57 static void EmitData(raw_ostream &Out, key_type_ref, data_type_ref V,
58 unsigned) {
59 using namespace llvm::support;
60 endian::Writer LE(Out);
61 LE.write(V.Hash);
62 for (uint64_t I : V.Counts)
63 LE.write(I);
64 }
65 };
66 }
1867
1968 error_code InstrProfWriter::addFunctionCounts(StringRef FunctionName,
2069 uint64_t FunctionHash,
4493 return instrprof_error::success;
4594 }
4695
47 void InstrProfWriter::write(raw_ostream &OS) {
48 // Write out the counts for each function.
96 void InstrProfWriter::write(raw_fd_ostream &OS) {
97 OnDiskChainedHashTableGenerator Generator;
98 uint64_t MaxFunctionCount = 0;
99
100 // Populate the hash table generator.
49101 for (const auto &I : FunctionData) {
50 StringRef Name = I.getKey();
51 uint64_t Hash = I.getValue().Hash;
52 const std::vector &Counts = I.getValue().Counts;
102 Generator.insert(I.getKey(), I.getValue());
103 if (I.getValue().Counts[0] > MaxFunctionCount)
104 MaxFunctionCount = I.getValue().Counts[0];
105 }
53106
54 OS << Name << "\n" << Hash << "\n" << Counts.size() << "\n";
55 for (uint64_t Count : Counts)
56 OS << Count << "\n";
57 OS << "\n";
58 }
107 using namespace llvm::support;
108 endian::Writer LE(OS);
109
110 // Write the header.
111 LE.write(IndexedInstrProf::Magic);
112 LE.write(IndexedInstrProf::Version);
113 LE.write(MaxFunctionCount);
114 LE.write(static_cast(IndexedInstrProf::HashType));
115
116 // Save a space to write the hash table start location.
117 uint64_t HashTableStartLoc = OS.tell();
118 LE.write(0);
119 // Write the hash table.
120 uint64_t HashTableStart = Generator.Emit(OS);
121
122 // Go back and fill in the hash table start.
123 OS.seek(HashTableStartLoc);
124 LE.write(HashTableStart);
59125 }
44 OVERFLOW: overflow.profdata: overflow: Counter overflow
55
66 RUN: not llvm-profdata show %p/Inputs/invalid-count-later.profdata 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER
7 RUN: not llvm-profdata merge %p/Inputs/invalid-count-later.profdata %p/Inputs/invalid-count-later.profdata 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER
7 RUN: not llvm-profdata merge %p/Inputs/invalid-count-later.profdata %p/Inputs/invalid-count-later.profdata -o /dev/null 2>&1 | FileCheck %s --check-prefix=INVALID-COUNT-LATER
88 INVALID-COUNT-LATER: error: {{.*}}invalid-count-later.profdata: Malformed profile data
99
1010 RUN: not llvm-profdata show %p/Inputs/bad-hash.profdata 2>&1 | FileCheck %s --check-prefix=BAD-HASH
11 RUN: not llvm-profdata merge %p/Inputs/bad-hash.profdata %p/Inputs/bad-hash.profdata 2>&1 | FileCheck %s --check-prefix=BAD-HASH
11 RUN: not llvm-profdata merge %p/Inputs/bad-hash.profdata %p/Inputs/bad-hash.profdata -o /dev/null 2>&1 | FileCheck %s --check-prefix=BAD-HASH
1212 BAD-HASH: error: {{.*}}bad-hash.profdata: Malformed profile data
None RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3-2.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3
1 RUN: llvm-profdata merge %p/Inputs/foo3-2.profdata %p/Inputs/foo3-1.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3
0 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3-2.profdata -o %t
1 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
2 RUN: llvm-profdata merge %p/Inputs/foo3-2.profdata %p/Inputs/foo3-1.profdata -o %t
3 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
24 FOO3: foo:
35 FOO3: Counters: 3
46 FOO3: Function count: 8
79 FOO3: Maximum function count: 8
810 FOO3: Maximum internal block count: 7
911
10 RUN: llvm-profdata merge %p/Inputs/foo4-1.profdata %p/Inputs/foo4-2.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO4
11 RUN: llvm-profdata merge %p/Inputs/foo4-2.profdata %p/Inputs/foo4-1.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO4
12 RUN: llvm-profdata merge %p/Inputs/foo4-1.profdata %p/Inputs/foo4-2.profdata -o %t
13 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4
14 RUN: llvm-profdata merge %p/Inputs/foo4-2.profdata %p/Inputs/foo4-1.profdata -o %t
15 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4
1216 FOO4: foo:
1317 FOO4: Counters: 4
1418 FOO4: Function count: 18
1721 FOO4: Maximum function count: 18
1822 FOO4: Maximum internal block count: 48
1923
20 RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.profdata %p/Inputs/foo3bar3-2.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
21 RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.profdata %p/Inputs/foo3bar3-1.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
24 RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.profdata %p/Inputs/foo3bar3-2.profdata -o %t
25 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
26 RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.profdata %p/Inputs/foo3bar3-1.profdata -o %t
27 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3
2228 FOO3BAR3: foo:
2329 FOO3BAR3: Counters: 3
2430 FOO3BAR3: Function count: 19
3137 FOO3BAR3: Maximum function count: 36
3238 FOO3BAR3: Maximum internal block count: 50
3339
34 RUN: llvm-profdata merge %p/Inputs/empty.profdata %p/Inputs/foo3-1.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
40 RUN: llvm-profdata merge %p/Inputs/empty.profdata %p/Inputs/foo3-1.profdata -o %t
41 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
3542 FOO3EMPTY: foo:
3643 FOO3EMPTY: Counters: 3
3744 FOO3EMPTY: Function count: 1
4047 FOO3EMPTY: Maximum function count: 1
4148 FOO3EMPTY: Maximum internal block count: 3
4249
43 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3bar3-1.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3
50 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3bar3-1.profdata -o %t
51 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3
4452 FOO3FOO3BAR3: foo:
4553 FOO3FOO3BAR3: Counters: 3
4654 FOO3FOO3BAR3: Function count: 3
5361 FOO3FOO3BAR3: Maximum function count: 7
5462 FOO3FOO3BAR3: Maximum internal block count: 13
5563
56 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/bar3-1.profdata | llvm-profdata show - -all-functions -counts | FileCheck %s --check-prefix=DISJOINT
64 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/bar3-1.profdata -o %t
65 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT
5766 DISJOINT: foo:
5867 DISJOINT: Counters: 3
5968 DISJOINT: Function count: 1
3838 cl::opt OutputFilename("output", cl::value_desc("output"),
3939 cl::init("-"),
4040 cl::desc("Output file"));
41 cl::alias OutputFilenameA("o", cl::desc("Alias for --output"),
42 cl::aliasopt(OutputFilename));
41 cl::alias OutputFilenameA("o", cl::desc("Alias for --output"), cl::Required,
42 cl::aliasopt(OutputFilename));
4343
4444 cl::ParseCommandLineOptions(argc, argv, "LLVM profile data merger\n");
4545
46 if (OutputFilename.empty())
47 OutputFilename = "-";
46 if (OutputFilename.compare("-") == 0)
47 exitWithError("Cannot write indexed profdata format to stdout.");
4848
4949 std::string ErrorInfo;
50 // FIXME: F_Text would be available if line_iterator could accept CRLF.
5150 raw_fd_ostream Output(OutputFilename.data(), ErrorInfo, sys::fs::F_None);
5251 if (!ErrorInfo.empty())
5352 exitWithError(ErrorInfo, OutputFilename);