Skip to content

Commit 148525e

Browse files
authored
Merge pull request #37183 from gottesmm/pr-7ec13868d15cea60ec4eafdbdb099efffff74f9a
[sil-optimizer] Add LLVM_ATTRIBUTE_UNUSED to InstModCallback::on* methods
2 parents 59daba4 + 456dfc9 commit 148525e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/swift/SILOptimizer/Utils/InstOptUtils.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,24 @@ class InstModCallbacks {
104104
InstModCallbacks(const InstModCallbacks &) = default;
105105

106106
/// Return a copy of self with deleteInstFunc set to \p newDeleteInstFunc.
107-
InstModCallbacks onDelete(decltype(deleteInstFunc) newDeleteInstFunc) const {
107+
LLVM_ATTRIBUTE_UNUSED InstModCallbacks
108+
onDelete(decltype(deleteInstFunc) newDeleteInstFunc) const {
108109
InstModCallbacks result = *this;
109110
result.deleteInstFunc = newDeleteInstFunc;
110111
return result;
111112
}
112113

113114
/// Return a copy of self with createdNewInstFunc set to \p
114115
/// newCreatedNewInstFunc.
115-
InstModCallbacks
116+
LLVM_ATTRIBUTE_UNUSED InstModCallbacks
116117
onCreateNewInst(decltype(createdNewInstFunc) newCreatedNewInstFunc) const {
117118
InstModCallbacks result = *this;
118119
result.createdNewInstFunc = newCreatedNewInstFunc;
119120
return result;
120121
}
121122

122123
/// Return a copy of self with setUseValueFunc set to \p newSetUseValueFunc.
123-
InstModCallbacks
124+
LLVM_ATTRIBUTE_UNUSED InstModCallbacks
124125
onSetUseValue(decltype(setUseValueFunc) newSetUseValueFunc) const {
125126
InstModCallbacks result = *this;
126127
result.setUseValueFunc = newSetUseValueFunc;
@@ -129,6 +130,7 @@ class InstModCallbacks {
129130

130131
/// Return a copy of self with notifyWillBeDeletedFunc set to \p
131132
/// newNotifyWillBeDeletedFunc.
133+
LLVM_ATTRIBUTE_UNUSED
132134
InstModCallbacks onNotifyWillBeDeleted(
133135
decltype(notifyWillBeDeletedFunc) newNotifyWillBeDeletedFunc) const {
134136
InstModCallbacks result = *this;

0 commit comments

Comments
 (0)