Skip to content

Commit a18abb7

Browse files
committed
[cxx-interop] Move definition of debug functions to be accessable in AST.
1 parent 13b0a5b commit a18abb7

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

lib/AST/NameLookupRequests.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,23 @@ swift::extractNearestSourceLoc(const ClangRecordMemberLookupDescriptor &desc) {
476476
return extractNearestSourceLoc(desc.recordDecl);
477477
}
478478

479+
//----------------------------------------------------------------------------//
480+
// CustomRefCountingOperation computation.
481+
//----------------------------------------------------------------------------//
482+
483+
void swift::simple_display(llvm::raw_ostream &out,
484+
CustomRefCountingOperationDescriptor desc) {
485+
out << "Finding custom (foreign reference) reference counting operation '"
486+
<< (desc.kind == CustomRefCountingOperationKind::retain ? "retain"
487+
: "release")
488+
<< "for '" << desc.decl->getNameStr() << "'.\n";
489+
}
490+
491+
SourceLoc
492+
swift::extractNearestSourceLoc(CustomRefCountingOperationDescriptor desc) {
493+
return SourceLoc();
494+
}
495+
479496
// Implement the clang importer type zone.
480497
#define SWIFT_TYPEID_ZONE ClangImporter
481498
#define SWIFT_TYPEID_HEADER "swift/ClangImporter/ClangImporterTypeIDZone.def"

lib/ClangImporter/ClangImporter.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6119,16 +6119,3 @@ CustomRefCountingOperationResult CustomRefCountingOperation::evaluate(
61196119

61206120
return {CustomRefCountingOperationResult::tooManyFound, nullptr, name};
61216121
}
6122-
6123-
void swift::simple_display(llvm::raw_ostream &out,
6124-
CustomRefCountingOperationDescriptor desc) {
6125-
out << "Finding custom (foreign reference) reference counting operation '"
6126-
<< (desc.kind == CustomRefCountingOperationKind::retain ? "retain"
6127-
: "release")
6128-
<< "for '" << desc.decl->getNameStr() << "'.\n";
6129-
}
6130-
6131-
SourceLoc
6132-
swift::extractNearestSourceLoc(CustomRefCountingOperationDescriptor desc) {
6133-
return SourceLoc();
6134-
}

0 commit comments

Comments
 (0)