@@ -92,7 +92,7 @@ void DiffWrapperBase::CompareEnumFields(
92
92
DiffStatus DiffWrapperBase::CompareEnumTypes (
93
93
const abi_util::EnumTypeIR *old_type, const abi_util::EnumTypeIR *new_type,
94
94
std::deque<std::string> *type_queue,
95
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
95
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
96
96
if (old_type->GetName () != new_type->GetName ()) {
97
97
return DiffStatus::direct_diff;
98
98
}
@@ -161,7 +161,7 @@ DiffWrapperBase::CompareCommonRecordFields(
161
161
const abi_util::RecordFieldIR *old_field,
162
162
const abi_util::RecordFieldIR *new_field,
163
163
std::deque<std::string> *type_queue,
164
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
164
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
165
165
if (old_field->GetOffset () != new_field->GetOffset () ||
166
166
// TODO: Should this be an inquality check instead ? Some compilers can
167
167
// make signatures dependant on absolute values of access specifiers.
@@ -181,7 +181,7 @@ DiffWrapperBase::CompareRecordFields(
181
181
const std::vector<abi_util::RecordFieldIR> &old_fields,
182
182
const std::vector<abi_util::RecordFieldIR> &new_fields,
183
183
std::deque<std::string> *type_queue,
184
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
184
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
185
185
std::pair<std::vector<abi_util::RecordFieldDiffIR>,
186
186
std::vector<const abi_util::RecordFieldIR *>> diffed_and_removed_fields;
187
187
std::map<std::string, const abi_util::RecordFieldIR *> old_fields_map;
@@ -247,7 +247,7 @@ bool DiffWrapperBase::CompareBaseSpecifiers(
247
247
const std::vector<abi_util::CXXBaseSpecifierIR> &old_base_specifiers,
248
248
const std::vector<abi_util::CXXBaseSpecifierIR> &new_base_specifiers,
249
249
std::deque<std::string> *type_queue,
250
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
250
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
251
251
if (old_base_specifiers.size () != new_base_specifiers.size ()) {
252
252
return false ;
253
253
}
@@ -270,7 +270,7 @@ void DiffWrapperBase::CompareTemplateInfo(
270
270
const std::vector<abi_util::TemplateElementIR> &old_template_elements,
271
271
const std::vector<abi_util::TemplateElementIR> &new_template_elements,
272
272
std::deque<std::string> *type_queue,
273
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
273
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
274
274
uint32_t old_template_size = old_template_elements.size ();
275
275
assert (old_template_size == new_template_elements.size ());
276
276
uint32_t i = 0 ;
@@ -290,7 +290,7 @@ DiffStatus DiffWrapperBase::CompareRecordTypes(
290
290
const abi_util::RecordTypeIR *old_type,
291
291
const abi_util::RecordTypeIR *new_type,
292
292
std::deque<std::string> *type_queue,
293
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
293
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
294
294
auto record_type_diff_ir = std::make_unique<abi_util::RecordTypeDiffIR>();
295
295
// Compare names.
296
296
if (old_type->GetName () != new_type->GetName ()) {
@@ -352,7 +352,7 @@ DiffStatus DiffWrapperBase::CompareLvalueReferenceTypes(
352
352
const abi_util::LvalueReferenceTypeIR *old_type,
353
353
const abi_util::LvalueReferenceTypeIR *new_type,
354
354
std::deque<std::string> *type_queue,
355
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
355
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
356
356
return CompareAndDumpTypeDiff (old_type->GetReferencedType (),
357
357
new_type->GetReferencedType (),
358
358
type_queue, diff_kind);
@@ -362,7 +362,7 @@ DiffStatus DiffWrapperBase::CompareRvalueReferenceTypes(
362
362
const abi_util::RvalueReferenceTypeIR *old_type,
363
363
const abi_util::RvalueReferenceTypeIR *new_type,
364
364
std::deque<std::string> *type_queue,
365
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
365
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
366
366
return CompareAndDumpTypeDiff (old_type->GetReferencedType (),
367
367
new_type->GetReferencedType (),
368
368
type_queue, diff_kind);
@@ -372,7 +372,7 @@ DiffStatus DiffWrapperBase::CompareQualifiedTypes(
372
372
const abi_util::QualifiedTypeIR *old_type,
373
373
const abi_util::QualifiedTypeIR *new_type,
374
374
std::deque<std::string> *type_queue,
375
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
375
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
376
376
// If all the qualifiers are not the same, return direct_diff, else
377
377
// recursively compare the unqualified types.
378
378
if (old_type->IsConst () != new_type->IsConst () ||
@@ -389,7 +389,7 @@ DiffStatus DiffWrapperBase::ComparePointerTypes(
389
389
const abi_util::PointerTypeIR *old_type,
390
390
const abi_util::PointerTypeIR *new_type,
391
391
std::deque<std::string> *type_queue,
392
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
392
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
393
393
// The following need to be the same for two pointer types to be considered
394
394
// equivalent:
395
395
// 1) Number of pointer indirections are the same.
@@ -420,7 +420,7 @@ DiffStatus DiffWrapperBase::CompareFunctionParameters(
420
420
const std::vector<abi_util::ParamIR> &old_parameters,
421
421
const std::vector<abi_util::ParamIR> &new_parameters,
422
422
std::deque<std::string> *type_queue,
423
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
423
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
424
424
size_t old_parameters_size = old_parameters.size ();
425
425
if (old_parameters_size != new_parameters.size ()) {
426
426
return DiffStatus::direct_diff;
@@ -444,7 +444,7 @@ DiffStatus DiffWrapperBase::CompareFunctionParameters(
444
444
DiffStatus DiffWrapperBase::CompareAndDumpTypeDiff (
445
445
const abi_util::TypeIR *old_type, const abi_util::TypeIR *new_type,
446
446
abi_util::LinkableMessageKind kind, std::deque<std::string> *type_queue,
447
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
447
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
448
448
if (kind == abi_util::LinkableMessageKind::BuiltinTypeKind) {
449
449
return CompareBuiltinTypes (
450
450
static_cast <const abi_util::BuiltinTypeIR *>(old_type),
@@ -508,7 +508,7 @@ static DiffStatus CompareDistinctKindMessages(
508
508
DiffStatus DiffWrapperBase::CompareAndDumpTypeDiff (
509
509
const std::string &old_type_str, const std::string &new_type_str,
510
510
std::deque<std::string> *type_queue,
511
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
511
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
512
512
// If either of the types are not found in their respective maps, the type
513
513
// was not exposed in a public header and we do a simple string comparison.
514
514
// Any diff found using a simple string comparison will be a direct diff.
@@ -553,7 +553,7 @@ DiffStatus DiffWrapperBase::CompareAndDumpTypeDiff(
553
553
554
554
template <>
555
555
bool DiffWrapper<abi_util::RecordTypeIR>::DumpDiff(
556
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
556
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
557
557
std::deque<std::string> type_queue;
558
558
if (oldp_->GetName () != newp_->GetName ()) {
559
559
llvm::errs () << " Comparing two different unreferenced records\n " ;
@@ -568,7 +568,7 @@ bool DiffWrapper<abi_util::RecordTypeIR>::DumpDiff(
568
568
569
569
template <>
570
570
bool DiffWrapper<abi_util::EnumTypeIR>::DumpDiff(
571
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
571
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
572
572
std::deque<std::string> type_queue;
573
573
if (oldp_->GetName () != newp_->GetName ()) {
574
574
llvm::errs () << " Comparing two different unreferenced enums\n " ;
@@ -583,7 +583,7 @@ bool DiffWrapper<abi_util::EnumTypeIR>::DumpDiff(
583
583
584
584
template <>
585
585
bool DiffWrapper<abi_util::GlobalVarIR>::DumpDiff(
586
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
586
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
587
587
std::deque<std::string> type_queue;
588
588
type_queue.push_back (oldp_->GetName ());
589
589
DiffStatus type_diff = CompareAndDumpTypeDiff (oldp_->GetReferencedType (),
@@ -602,7 +602,7 @@ bool DiffWrapper<abi_util::GlobalVarIR>::DumpDiff(
602
602
603
603
template <>
604
604
bool DiffWrapper<abi_util::FunctionIR>::DumpDiff(
605
- abi_util::IRDiffDumper ::DiffKind diff_kind) {
605
+ abi_util::DiffMessageIR ::DiffKind diff_kind) {
606
606
std::deque<std::string> type_queue;
607
607
type_queue.push_back (oldp_->GetName ());
608
608
DiffStatus param_diffs = CompareFunctionParameters (oldp_->GetParameters (),
0 commit comments