annotate tools/llvm-pdbutil/Diff.cpp @ 134:3a76565eade5 LLVM5.0.1

update 5.0.1
author mir3636
date Sat, 17 Feb 2018 09:57:20 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 //===- Diff.cpp - PDB diff utility ------------------------------*- C++ -*-===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3 // The LLVM Compiler Infrastructure
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 // This file is distributed under the University of Illinois Open Source
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 // License. See LICENSE.TXT for details.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10 #include "Diff.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12 #include "DiffPrinter.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 #include "FormatUtil.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 #include "StreamUtil.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15 #include "llvm-pdbutil.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 #include "llvm/ADT/StringSet.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 #include "llvm/DebugInfo/PDB/Native/DbiStream.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 #include "llvm/DebugInfo/PDB/Native/Formatters.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21 #include "llvm/DebugInfo/PDB/Native/InfoStream.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22 #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 #include "llvm/DebugInfo/PDB/Native/PDBStringTable.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 #include "llvm/DebugInfo/PDB/Native/RawConstants.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 #include "llvm/Support/FormatAdapters.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 #include "llvm/Support/FormatProviders.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 #include "llvm/Support/FormatVariadic.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
29 #include "llvm/Support/Path.h"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
30
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
31 using namespace llvm;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
32 using namespace llvm::pdb;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
33
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
34 namespace {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
35 // Compare and format two stream numbers. Stream numbers are considered
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
36 // identical if they contain the same value, equivalent if they are both
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
37 // the invalid stream or neither is the invalid stream, and different if
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
38 // one is the invalid stream and another isn't.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
39 struct StreamNumberProvider {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
40 static DiffResult compare(uint16_t L, uint16_t R) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
41 if (L == R)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
42 return DiffResult::IDENTICAL;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
43 bool LP = L != kInvalidStreamIndex;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
44 bool RP = R != kInvalidStreamIndex;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
45 if (LP != RP)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
46 return DiffResult::DIFFERENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
47 return DiffResult::EQUIVALENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
48 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
49
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
50 static std::string format(uint16_t SN, bool Right) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
51 if (SN == kInvalidStreamIndex)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
52 return "(not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
53 return formatv("{0}", SN).str();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
54 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
55 };
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
56
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
57 // Compares and formats two module indices. Modis are considered identical
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
58 // if they are identical, equivalent if they either both contain a value or
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
59 // both don't contain a value, and different if one contains a value and the
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
60 // other doesn't.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
61 struct ModiProvider {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
62 DiffResult compare(Optional<uint32_t> L, Optional<uint32_t> R) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
63 if (L == R)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
64 return DiffResult::IDENTICAL;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
65 if (L.hasValue() != R.hasValue())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
66 return DiffResult::DIFFERENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
67 return DiffResult::EQUIVALENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
68 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
69
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
70 std::string format(Optional<uint32_t> Modi, bool Right) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
71 if (!Modi.hasValue())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
72 return "(not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
73 return formatv("{0}", *Modi).str();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
74 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
75 };
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
76
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
77 // Compares and formats two paths embedded in the PDB, ignoring the beginning
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
78 // of the path if the user specified it as a "root path" on the command line.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
79 struct BinaryPathProvider {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
80 explicit BinaryPathProvider(uint32_t MaxLen) : MaxLen(MaxLen) {}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
81
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
82 DiffResult compare(StringRef L, StringRef R) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
83 if (L == R)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
84 return DiffResult::IDENTICAL;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
85
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
86 SmallString<64> LN = removeRoot(L, false);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
87 SmallString<64> RN = removeRoot(R, true);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
88
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
89 return (LN.equals_lower(RN)) ? DiffResult::EQUIVALENT
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
90 : DiffResult::DIFFERENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
91 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
92
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
93 std::string format(StringRef S, bool Right) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
94 if (S.empty())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
95 return "(empty)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
96
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
97 SmallString<64> Native = removeRoot(S, Right);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
98 return truncateStringFront(Native.str(), MaxLen);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
99 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
100
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
101 SmallString<64> removeRoot(StringRef Path, bool IsRight) const {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
102 SmallString<64> Native(Path);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
103 auto &RootOpt = IsRight ? opts::diff::RightRoot : opts::diff::LeftRoot;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
104 SmallString<64> Root(static_cast<std::string>(RootOpt));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
105 // pdb paths always use windows syntax, convert slashes to backslashes.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
106 sys::path::native(Root, sys::path::Style::windows);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
107 if (sys::path::has_stem(Root, sys::path::Style::windows))
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
108 sys::path::append(Root, sys::path::Style::windows,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
109 sys::path::get_separator(sys::path::Style::windows));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
110
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
111 sys::path::replace_path_prefix(Native, Root, "", sys::path::Style::windows);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
112 return Native;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
113 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
114 uint32_t MaxLen;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
115 };
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
116
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
117 // Compare and format two stream purposes. For general streams, this just
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
118 // compares the description. For module streams it uses the path comparison
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
119 // algorithm taking into consideration the binary root, described above.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
120 // Formatting stream purposes just prints the stream purpose, except for
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
121 // module streams and named streams, where it prefixes the name / module
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
122 // with an identifier. Example:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
123 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
124 // Named Stream "\names"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
125 // Module Stream "foo.obj"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
126 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
127 // If a named stream is too long to fit in a column, it is truncated at the
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
128 // end, and if a module is too long to fit in a column, it is truncated at the
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
129 // beginning. Example:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
130 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
131 // Named Stream "\Really Long Str..."
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
132 // Module Stream "...puts\foo.obj"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
133 //
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
134 struct StreamPurposeProvider {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
135 explicit StreamPurposeProvider(uint32_t MaxLen) : MaxLen(MaxLen) {}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
136
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
137 DiffResult compare(const StreamInfo &L, const StreamInfo &R) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
138 if (L.getPurpose() != R.getPurpose())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
139 return DiffResult::DIFFERENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
140 if (L.getPurpose() == StreamPurpose::ModuleStream) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
141 BinaryPathProvider PathProvider(MaxLen);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
142 return PathProvider.compare(L.getShortName(), R.getShortName());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
143 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
144 return (L.getShortName() == R.getShortName()) ? DiffResult::IDENTICAL
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
145 : DiffResult::DIFFERENT;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
146 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
147
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
148 std::string format(const StreamInfo &P, bool Right) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
149 if (P.getPurpose() == StreamPurpose::Other ||
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
150 P.getPurpose() == StreamPurpose::Symbols)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
151 return truncateStringBack(P.getShortName(), MaxLen);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
152 if (P.getPurpose() == StreamPurpose::NamedStream)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
153 return truncateQuotedNameBack("Named Stream", P.getShortName(), MaxLen);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
154
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
155 assert(P.getPurpose() == StreamPurpose::ModuleStream);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
156 uint32_t ExtraChars = strlen("Module \"\"");
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
157 BinaryPathProvider PathProvider(MaxLen - ExtraChars);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
158 std::string Result = PathProvider.format(P.getShortName(), Right);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
159 return formatv("Module \"{0}\"", Result);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
160 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
161
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
162 uint32_t MaxLen;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
163 };
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
164 } // namespace
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
165
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
166 namespace llvm {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
167 template <> struct format_provider<PdbRaw_FeatureSig> {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
168 static void format(const PdbRaw_FeatureSig &Sig, raw_ostream &Stream,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
169 StringRef Style) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
170 switch (Sig) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
171 case PdbRaw_FeatureSig::MinimalDebugInfo:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
172 Stream << "MinimalDebugInfo";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
173 break;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
174 case PdbRaw_FeatureSig::NoTypeMerge:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
175 Stream << "NoTypeMerge";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
176 break;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
177 case PdbRaw_FeatureSig::VC110:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
178 Stream << "VC110";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
179 break;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
180 case PdbRaw_FeatureSig::VC140:
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
181 Stream << "VC140";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
182 break;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
183 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
184 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
185 };
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
186 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
187
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
188 template <typename R> using ValueOfRange = llvm::detail::ValueOfRange<R>;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
189
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
190 DiffStyle::DiffStyle(PDBFile &File1, PDBFile &File2)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
191 : File1(File1), File2(File2) {}
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
192
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
193 Error DiffStyle::dump() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
194 if (auto EC = diffSuperBlock())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
195 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
196
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
197 if (auto EC = diffFreePageMap())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
198 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
199
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
200 if (auto EC = diffStreamDirectory())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
201 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
202
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
203 if (auto EC = diffStringTable())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
204 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
205
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
206 if (auto EC = diffInfoStream())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
207 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
208
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
209 if (auto EC = diffDbiStream())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
210 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
211
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
212 if (auto EC = diffSectionContribs())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
213 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
214
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
215 if (auto EC = diffSectionMap())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
216 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
217
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
218 if (auto EC = diffFpoStream())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
219 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
220
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
221 if (auto EC = diffTpiStream(StreamTPI))
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
222 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
223
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
224 if (auto EC = diffTpiStream(StreamIPI))
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
225 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
226
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
227 if (auto EC = diffPublics())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
228 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
229
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
230 if (auto EC = diffGlobals())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
231 return EC;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
232
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
233 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
234 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
235
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
236 Error DiffStyle::diffSuperBlock() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
237 DiffPrinter D(2, "MSF Super Block", 16, 20, opts::diff::PrintResultColumn,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
238 opts::diff::PrintValueColumns, outs());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
239 D.printExplicit("File", DiffResult::UNSPECIFIED,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
240 truncateStringFront(File1.getFilePath(), 18),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
241 truncateStringFront(File2.getFilePath(), 18));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
242 D.print("Block Size", File1.getBlockSize(), File2.getBlockSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
243 D.print("Block Count", File1.getBlockCount(), File2.getBlockCount());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
244 D.print("Unknown 1", File1.getUnknown1(), File2.getUnknown1());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
245 D.print("Directory Size", File1.getNumDirectoryBytes(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
246 File2.getNumDirectoryBytes());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
247 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
248 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
249
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
250 Error DiffStyle::diffStreamDirectory() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
251 DiffPrinter D(2, "Stream Directory", 30, 20, opts::diff::PrintResultColumn,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
252 opts::diff::PrintValueColumns, outs());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
253 D.printExplicit("File", DiffResult::UNSPECIFIED,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
254 truncateStringFront(File1.getFilePath(), 18),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
255 truncateStringFront(File2.getFilePath(), 18));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
256
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
257 SmallVector<StreamInfo, 32> P;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
258 SmallVector<StreamInfo, 32> Q;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
259 discoverStreamPurposes(File1, P);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
260 discoverStreamPurposes(File2, Q);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
261 D.print("Stream Count", File1.getNumStreams(), File2.getNumStreams());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
262 auto PI = to_vector<32>(enumerate(P));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
263 auto QI = to_vector<32>(enumerate(Q));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
264
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
265 // Scan all streams in the left hand side, looking for ones that are also
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
266 // in the right. Each time we find one, remove it. When we're done, Q
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
267 // should contain all the streams that are in the right but not in the left.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
268 StreamPurposeProvider StreamProvider(28);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
269 for (const auto &P : PI) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
270 typedef decltype(PI) ContainerType;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
271 typedef typename ContainerType::value_type value_type;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
272
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
273 auto Iter = llvm::find_if(QI, [P, &StreamProvider](const value_type &V) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
274 DiffResult Result = StreamProvider.compare(P.value(), V.value());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
275 return Result == DiffResult::EQUIVALENT ||
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
276 Result == DiffResult::IDENTICAL;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
277 });
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
278
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
279 if (Iter == QI.end()) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
280 D.printExplicit(StreamProvider.format(P.value(), false),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
281 DiffResult::DIFFERENT, P.index(), "(not present)");
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
282 continue;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
283 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
284
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
285 D.print<EquivalentDiffProvider>(StreamProvider.format(P.value(), false),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
286 P.index(), Iter->index());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
287 QI.erase(Iter);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
288 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
289
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
290 for (const auto &Q : QI) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
291 D.printExplicit(StreamProvider.format(Q.value(), true),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
292 DiffResult::DIFFERENT, "(not present)", Q.index());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
293 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
294
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
295 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
296 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
297
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
298 Error DiffStyle::diffStringTable() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
299 DiffPrinter D(2, "String Table", 30, 20, opts::diff::PrintResultColumn,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
300 opts::diff::PrintValueColumns, outs());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
301 D.printExplicit("File", DiffResult::UNSPECIFIED,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
302 truncateStringFront(File1.getFilePath(), 18),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
303 truncateStringFront(File2.getFilePath(), 18));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
304
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
305 auto ExpectedST1 = File1.getStringTable();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
306 auto ExpectedST2 = File2.getStringTable();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
307 bool Has1 = !!ExpectedST1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
308 bool Has2 = !!ExpectedST2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
309 std::string Count1 = Has1 ? llvm::utostr(ExpectedST1->getNameCount())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
310 : "(string table not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
311 std::string Count2 = Has2 ? llvm::utostr(ExpectedST2->getNameCount())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
312 : "(string table not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
313 D.print("Number of Strings", Count1, Count2);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
314
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
315 if (!Has1 || !Has2) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
316 consumeError(ExpectedST1.takeError());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
317 consumeError(ExpectedST2.takeError());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
318 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
319 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
320
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
321 auto &ST1 = *ExpectedST1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
322 auto &ST2 = *ExpectedST2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
323
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
324 D.print("Hash Version", ST1.getHashVersion(), ST2.getHashVersion());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
325 D.print("Byte Size", ST1.getByteSize(), ST2.getByteSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
326 D.print("Signature", ST1.getSignature(), ST2.getSignature());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
327
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
328 // Both have a valid string table, dive in and compare individual strings.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
329
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
330 auto IdList1 = ST1.name_ids();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
331 auto IdList2 = ST2.name_ids();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
332 StringSet<> LS;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
333 StringSet<> RS;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
334 uint32_t Empty1 = 0;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
335 uint32_t Empty2 = 0;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
336 for (auto ID : IdList1) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
337 auto S = ST1.getStringForID(ID);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
338 if (!S)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
339 return S.takeError();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
340 if (S->empty())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
341 ++Empty1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
342 else
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
343 LS.insert(*S);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
344 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
345 for (auto ID : IdList2) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
346 auto S = ST2.getStringForID(ID);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
347 if (!S)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
348 return S.takeError();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
349 if (S->empty())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
350 ++Empty2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
351 else
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
352 RS.insert(*S);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
353 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
354 D.print("Empty Strings", Empty1, Empty2);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
355
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
356 for (const auto &S : LS) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
357 auto R = RS.find(S.getKey());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
358 std::string Truncated = truncateStringMiddle(S.getKey(), 28);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
359 uint32_t I = cantFail(ST1.getIDForString(S.getKey()));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
360 if (R == RS.end()) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
361 D.printExplicit(Truncated, DiffResult::DIFFERENT, I, "(not present)");
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
362 continue;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
363 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
364
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
365 uint32_t J = cantFail(ST2.getIDForString(R->getKey()));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
366 D.print<EquivalentDiffProvider>(Truncated, I, J);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
367 RS.erase(R);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
368 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
369
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
370 for (const auto &S : RS) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
371 auto L = LS.find(S.getKey());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
372 std::string Truncated = truncateStringMiddle(S.getKey(), 28);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
373 uint32_t J = cantFail(ST2.getIDForString(S.getKey()));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
374 if (L == LS.end()) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
375 D.printExplicit(Truncated, DiffResult::DIFFERENT, "(not present)", J);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
376 continue;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
377 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
378
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
379 uint32_t I = cantFail(ST1.getIDForString(L->getKey()));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
380 D.print<EquivalentDiffProvider>(Truncated, I, J);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
381 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
382 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
383 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
384
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
385 Error DiffStyle::diffFreePageMap() { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
386
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
387 Error DiffStyle::diffInfoStream() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
388 DiffPrinter D(2, "PDB Stream", 22, 40, opts::diff::PrintResultColumn,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
389 opts::diff::PrintValueColumns, outs());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
390 D.printExplicit("File", DiffResult::UNSPECIFIED,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
391 truncateStringFront(File1.getFilePath(), 38),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
392 truncateStringFront(File2.getFilePath(), 38));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
393
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
394 auto ExpectedInfo1 = File1.getPDBInfoStream();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
395 auto ExpectedInfo2 = File2.getPDBInfoStream();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
396
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
397 bool Has1 = !!ExpectedInfo1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
398 bool Has2 = !!ExpectedInfo2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
399 if (!(Has1 && Has2)) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
400 std::string L = Has1 ? "(present)" : "(not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
401 std::string R = Has2 ? "(present)" : "(not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
402 D.print("Stream", L, R);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
403
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
404 consumeError(ExpectedInfo1.takeError());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
405 consumeError(ExpectedInfo2.takeError());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
406 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
407 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
408
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
409 auto &IS1 = *ExpectedInfo1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
410 auto &IS2 = *ExpectedInfo2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
411 D.print("Stream Size", IS1.getStreamSize(), IS2.getStreamSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
412 D.print("Age", IS1.getAge(), IS2.getAge());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
413 D.print("Guid", IS1.getGuid(), IS2.getGuid());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
414 D.print("Signature", IS1.getSignature(), IS2.getSignature());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
415 D.print("Version", IS1.getVersion(), IS2.getVersion());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
416 D.diffUnorderedArray("Feature", IS1.getFeatureSignatures(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
417 IS2.getFeatureSignatures());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
418 D.print("Named Stream Size", IS1.getNamedStreamMapByteSize(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
419 IS2.getNamedStreamMapByteSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
420 StringMap<uint32_t> NSL = IS1.getNamedStreams().getStringMap();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
421 StringMap<uint32_t> NSR = IS2.getNamedStreams().getStringMap();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
422 D.diffUnorderedMap<EquivalentDiffProvider>("Named Stream", NSL, NSR);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
423 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
424 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
425
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
426 typedef std::pair<uint32_t, DbiModuleDescriptor> IndexedModuleDescriptor;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
427 typedef std::vector<IndexedModuleDescriptor> IndexedModuleDescriptorList;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
428
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
429 static IndexedModuleDescriptorList
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
430 getModuleDescriptors(const DbiModuleList &ML) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
431 IndexedModuleDescriptorList List;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
432 List.reserve(ML.getModuleCount());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
433 for (uint32_t I = 0; I < ML.getModuleCount(); ++I)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
434 List.emplace_back(I, ML.getModuleDescriptor(I));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
435 return List;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
436 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
437
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
438 static IndexedModuleDescriptorList::iterator
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
439 findOverrideEquivalentModule(uint32_t Modi,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
440 IndexedModuleDescriptorList &OtherList) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
441 auto &EqMap = opts::diff::Equivalences;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
442
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
443 auto Iter = EqMap.find(Modi);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
444 if (Iter == EqMap.end())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
445 return OtherList.end();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
446
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
447 uint32_t EqValue = Iter->second;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
448
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
449 return llvm::find_if(OtherList,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
450 [EqValue](const IndexedModuleDescriptor &Desc) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
451 return Desc.first == EqValue;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
452 });
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
453 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
454
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
455 static IndexedModuleDescriptorList::iterator
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
456 findEquivalentModule(const IndexedModuleDescriptor &Item,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
457 IndexedModuleDescriptorList &OtherList, bool ItemIsRight) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
458
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
459 if (!ItemIsRight) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
460 uint32_t Modi = Item.first;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
461 auto OverrideIter = findOverrideEquivalentModule(Modi, OtherList);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
462 if (OverrideIter != OtherList.end())
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
463 return OverrideIter;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
464 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
465
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
466 BinaryPathProvider PathProvider(28);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
467
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
468 auto Iter = OtherList.begin();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
469 auto End = OtherList.end();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
470 for (; Iter != End; ++Iter) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
471 const IndexedModuleDescriptor *Left = &Item;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
472 const IndexedModuleDescriptor *Right = &*Iter;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
473 if (ItemIsRight)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
474 std::swap(Left, Right);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
475 DiffResult Result = PathProvider.compare(Left->second.getModuleName(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
476 Right->second.getModuleName());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
477 if (Result == DiffResult::EQUIVALENT || Result == DiffResult::IDENTICAL)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
478 return Iter;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
479 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
480 return OtherList.end();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
481 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
482
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
483 static void diffOneModule(DiffPrinter &D, const IndexedModuleDescriptor &Item,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
484 IndexedModuleDescriptorList &Other,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
485 bool ItemIsRight) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
486 StreamPurposeProvider HeaderProvider(70);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
487 StreamInfo Info = StreamInfo::createModuleStream(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
488 Item.second.getModuleName(), Item.second.getModuleStreamIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
489 Item.first);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
490 D.printFullRow(HeaderProvider.format(Info, ItemIsRight));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
491
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
492 const auto *L = &Item;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
493
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
494 auto Iter = findEquivalentModule(Item, Other, ItemIsRight);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
495 if (Iter == Other.end()) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
496 // We didn't find this module at all on the other side. Just print one row
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
497 // and continue.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
498 if (ItemIsRight)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
499 D.print<ModiProvider>("- Modi", None, Item.first);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
500 else
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
501 D.print<ModiProvider>("- Modi", Item.first, None);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
502 return;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
503 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
504
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
505 // We did find this module. Go through and compare each field.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
506 const auto *R = &*Iter;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
507 if (ItemIsRight)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
508 std::swap(L, R);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
509
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
510 BinaryPathProvider PathProvider(28);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
511 D.print<ModiProvider>("- Modi", L->first, R->first);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
512 D.print<BinaryPathProvider>("- Obj File Name", L->second.getObjFileName(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
513 R->second.getObjFileName(), PathProvider);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
514 D.print<StreamNumberProvider>("- Debug Stream",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
515 L->second.getModuleStreamIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
516 R->second.getModuleStreamIndex());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
517 D.print("- C11 Byte Size", L->second.getC11LineInfoByteSize(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
518 R->second.getC11LineInfoByteSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
519 D.print("- C13 Byte Size", L->second.getC13LineInfoByteSize(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
520 R->second.getC13LineInfoByteSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
521 D.print("- # of files", L->second.getNumberOfFiles(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
522 R->second.getNumberOfFiles());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
523 D.print("- Pdb File Path Index", L->second.getPdbFilePathNameIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
524 R->second.getPdbFilePathNameIndex());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
525 D.print("- Source File Name Index", L->second.getSourceFileNameIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
526 R->second.getSourceFileNameIndex());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
527 D.print("- Symbol Byte Size", L->second.getSymbolDebugInfoByteSize(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
528 R->second.getSymbolDebugInfoByteSize());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
529 Other.erase(Iter);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
530 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
531
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
532 Error DiffStyle::diffDbiStream() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
533 DiffPrinter D(2, "DBI Stream", 40, 30, opts::diff::PrintResultColumn,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
534 opts::diff::PrintValueColumns, outs());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
535 D.printExplicit("File", DiffResult::UNSPECIFIED,
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
536 truncateStringFront(File1.getFilePath(), 28),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
537 truncateStringFront(File2.getFilePath(), 28));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
538
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
539 auto ExpectedDbi1 = File1.getPDBDbiStream();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
540 auto ExpectedDbi2 = File2.getPDBDbiStream();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
541
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
542 bool Has1 = !!ExpectedDbi1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
543 bool Has2 = !!ExpectedDbi2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
544 if (!(Has1 && Has2)) {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
545 std::string L = Has1 ? "(present)" : "(not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
546 std::string R = Has2 ? "(present)" : "(not present)";
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
547 D.print("Stream", L, R);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
548
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
549 consumeError(ExpectedDbi1.takeError());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
550 consumeError(ExpectedDbi2.takeError());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
551 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
552 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
553
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
554 auto &DL = *ExpectedDbi1;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
555 auto &DR = *ExpectedDbi2;
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
556
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
557 D.print("Dbi Version", (uint32_t)DL.getDbiVersion(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
558 (uint32_t)DR.getDbiVersion());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
559 D.print("Age", DL.getAge(), DR.getAge());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
560 D.print("Machine", (uint16_t)DL.getMachineType(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
561 (uint16_t)DR.getMachineType());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
562 D.print("Flags", DL.getFlags(), DR.getFlags());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
563 D.print("Build Major", DL.getBuildMajorVersion(), DR.getBuildMajorVersion());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
564 D.print("Build Minor", DL.getBuildMinorVersion(), DR.getBuildMinorVersion());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
565 D.print("Build Number", DL.getBuildNumber(), DR.getBuildNumber());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
566 D.print("PDB DLL Version", DL.getPdbDllVersion(), DR.getPdbDllVersion());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
567 D.print("PDB DLL RBLD", DL.getPdbDllRbld(), DR.getPdbDllRbld());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
568 D.print<StreamNumberProvider>("DBG (FPO)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
569 DL.getDebugStreamIndex(DbgHeaderType::FPO),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
570 DR.getDebugStreamIndex(DbgHeaderType::FPO));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
571 D.print<StreamNumberProvider>(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
572 "DBG (Exception)", DL.getDebugStreamIndex(DbgHeaderType::Exception),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
573 DR.getDebugStreamIndex(DbgHeaderType::Exception));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
574 D.print<StreamNumberProvider>("DBG (Fixup)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
575 DL.getDebugStreamIndex(DbgHeaderType::Fixup),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
576 DR.getDebugStreamIndex(DbgHeaderType::Fixup));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
577 D.print<StreamNumberProvider>(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
578 "DBG (OmapToSrc)", DL.getDebugStreamIndex(DbgHeaderType::OmapToSrc),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
579 DR.getDebugStreamIndex(DbgHeaderType::OmapToSrc));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
580 D.print<StreamNumberProvider>(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
581 "DBG (OmapFromSrc)", DL.getDebugStreamIndex(DbgHeaderType::OmapFromSrc),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
582 DR.getDebugStreamIndex(DbgHeaderType::OmapFromSrc));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
583 D.print<StreamNumberProvider>(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
584 "DBG (SectionHdr)", DL.getDebugStreamIndex(DbgHeaderType::SectionHdr),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
585 DR.getDebugStreamIndex(DbgHeaderType::SectionHdr));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
586 D.print<StreamNumberProvider>(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
587 "DBG (TokenRidMap)", DL.getDebugStreamIndex(DbgHeaderType::TokenRidMap),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
588 DR.getDebugStreamIndex(DbgHeaderType::TokenRidMap));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
589 D.print<StreamNumberProvider>("DBG (Xdata)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
590 DL.getDebugStreamIndex(DbgHeaderType::Xdata),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
591 DR.getDebugStreamIndex(DbgHeaderType::Xdata));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
592 D.print<StreamNumberProvider>("DBG (Pdata)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
593 DL.getDebugStreamIndex(DbgHeaderType::Pdata),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
594 DR.getDebugStreamIndex(DbgHeaderType::Pdata));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
595 D.print<StreamNumberProvider>("DBG (NewFPO)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
596 DL.getDebugStreamIndex(DbgHeaderType::NewFPO),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
597 DR.getDebugStreamIndex(DbgHeaderType::NewFPO));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
598 D.print<StreamNumberProvider>(
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
599 "DBG (SectionHdrOrig)",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
600 DL.getDebugStreamIndex(DbgHeaderType::SectionHdrOrig),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
601 DR.getDebugStreamIndex(DbgHeaderType::SectionHdrOrig));
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
602 D.print<StreamNumberProvider>("Globals Stream",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
603 DL.getGlobalSymbolStreamIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
604 DR.getGlobalSymbolStreamIndex());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
605 D.print<StreamNumberProvider>("Publics Stream",
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
606 DL.getPublicSymbolStreamIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
607 DR.getPublicSymbolStreamIndex());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
608 D.print<StreamNumberProvider>("Symbol Records", DL.getSymRecordStreamIndex(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
609 DR.getSymRecordStreamIndex());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
610 D.print("Has CTypes", DL.hasCTypes(), DR.hasCTypes());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
611 D.print("Is Incrementally Linked", DL.isIncrementallyLinked(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
612 DR.isIncrementallyLinked());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
613 D.print("Is Stripped", DL.isStripped(), DR.isStripped());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
614 const DbiModuleList &ML = DL.modules();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
615 const DbiModuleList &MR = DR.modules();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
616 D.print("Module Count", ML.getModuleCount(), MR.getModuleCount());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
617 D.print("Source File Count", ML.getSourceFileCount(),
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
618 MR.getSourceFileCount());
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
619 auto MDL = getModuleDescriptors(ML);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
620 auto MDR = getModuleDescriptors(MR);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
621 // Scan all module descriptors from the left, and look for corresponding
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
622 // module descriptors on the right.
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
623 for (const auto &L : MDL)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
624 diffOneModule(D, L, MDR, false);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
625
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
626 for (const auto &R : MDR)
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
627 diffOneModule(D, R, MDL, true);
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
628
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
629 return Error::success();
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
630 }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
631
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
632 Error DiffStyle::diffSectionContribs() { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
633
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
634 Error DiffStyle::diffSectionMap() { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
635
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
636 Error DiffStyle::diffFpoStream() { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
637
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
638 Error DiffStyle::diffTpiStream(int Index) { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
639
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
640 Error DiffStyle::diffModuleInfoStream(int Index) { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
641
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
642 Error DiffStyle::diffPublics() { return Error::success(); }
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
643
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
644 Error DiffStyle::diffGlobals() { return Error::success(); }