Skip to content
Snippets Groups Projects
Commit 28eac520 authored by Ted Kremenek's avatar Ted Kremenek
Browse files

Also include file modification time and size in output of SerializedDiagnosticPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143757 91177308-0d34-0410-b5e6-96231b3b80d8
parent fcf28b2b
No related branches found
No related tags found
No related merge requests found
...@@ -245,7 +245,9 @@ void SDiagsWriter::EmitBlockInfoBlock() { ...@@ -245,7 +245,9 @@ void SDiagsWriter::EmitBlockInfoBlock() {
Abbrev)); Abbrev));
Abbrev = new BitCodeAbbrev(); Abbrev = new BitCodeAbbrev();
Abbrev->Add(BitCodeAbbrevOp(RECORD_CATEGORY)); Abbrev->Add(BitCodeAbbrevOp(RECORD_FILENAME));
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 64)); // Size.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 64)); // Modifcation time.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 16)); // Text size. Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 16)); // Text size.
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // File name text. Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob)); // File name text.
Abbrevs.set(RECORD_FILENAME, Stream.EmitBlockInfoAbbrev(BLOCK_STRINGS, Abbrevs.set(RECORD_FILENAME, Stream.EmitBlockInfoAbbrev(BLOCK_STRINGS,
...@@ -338,6 +340,8 @@ void SDiagsWriter::EmitCategoriesAndFileNames() { ...@@ -338,6 +340,8 @@ void SDiagsWriter::EmitCategoriesAndFileNames() {
StringRef Name = FE->getName(); StringRef Name = FE->getName();
Record.clear(); Record.clear();
Record.push_back(FE->getSize());
Record.push_back(FE->getModificationTime());
Record.push_back(Name.size()); Record.push_back(Name.size());
Stream.EmitRecordWithBlob(Abbrevs.get(RECORD_FILENAME), Record, Name); Stream.EmitRecordWithBlob(Abbrevs.get(RECORD_FILENAME), Record, Name);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment