Skip to content

Commit c33b9ee

Browse files
committed
[move-only] Refactor both implementations to use the same diagnostic infrastructure.
This let me clean up the parts of the address infrastructure that rely on the object checker.
1 parent 3d53d73 commit c33b9ee

File tree

7 files changed

+619
-644
lines changed

7 files changed

+619
-644
lines changed

include/swift/SILOptimizer/Utils/InstructionDeleter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ class InstructionDeleter {
126126

127127
InstModCallbacks &getCallbacks() { return callbacks; }
128128

129+
void setCallbacks(const InstModCallbacks &newCallbacks) {
130+
callbacks = newCallbacks;
131+
}
132+
129133
bool hadCallbackInvocation() const {
130134
return const_cast<InstructionDeleter *>(this)
131135
->getCallbacks()

lib/SILOptimizer/Mandatory/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ target_sources(swiftSILOptimizer PRIVATE
2424
MovedAsyncVarDebugInfoPropagator.cpp
2525
MoveKillsCopyableAddressesChecker.cpp
2626
MoveKillsCopyableValuesChecker.cpp
27+
MoveOnlyDiagnostics.cpp
2728
MoveOnlyObjectChecker.cpp
2829
MoveOnlyAddressChecker.cpp
2930
MoveOnlyDeinitInsertion.cpp

0 commit comments

Comments
 (0)