File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -192,21 +192,19 @@ class PrettyStackTraceSelector : public llvm::PrettyStackTraceEntry {
192
192
// / specific differentiability witness.
193
193
class PrettyStackTraceDifferentiabilityWitness
194
194
: public llvm::PrettyStackTraceEntry {
195
- ASTContext &Context;
196
195
const SILDifferentiabilityWitnessKey Key;
197
196
const char *Action;
198
197
199
198
public:
200
199
PrettyStackTraceDifferentiabilityWitness (
201
- ASTContext &C, const char *action,
202
- const SILDifferentiabilityWitnessKey key)
203
- : Context(C), Key(key), Action(action) {}
200
+ const char *action, const SILDifferentiabilityWitnessKey key)
201
+ : Key(key), Action(action) {}
204
202
virtual void print (llvm::raw_ostream &OS) const ;
205
203
};
206
204
207
205
void printDifferentiabilityWitnessDescription (
208
206
llvm::raw_ostream &out, const SILDifferentiabilityWitnessKey key,
209
- ASTContext &Context, bool addNewline = true );
207
+ bool addNewline = true );
210
208
// SWIFT_ENABLE_TENSORFLOW END
211
209
212
210
} // end namespace swift
Original file line number Diff line number Diff line change @@ -267,12 +267,12 @@ void PrettyStackTraceSelector::print(llvm::raw_ostream &out) const {
267
267
void PrettyStackTraceDifferentiabilityWitness::print (
268
268
llvm::raw_ostream &out) const {
269
269
out << " While " << Action << ' ' ;
270
- printDifferentiabilityWitnessDescription (out, Key, Context );
270
+ printDifferentiabilityWitnessDescription (out, Key);
271
271
}
272
272
273
273
void swift::printDifferentiabilityWitnessDescription (
274
274
llvm::raw_ostream &out, const SILDifferentiabilityWitnessKey key,
275
- ASTContext &Context, bool addNewline) {
275
+ bool addNewline) {
276
276
out << key.first << " " ;
277
277
key.second .print (out);
278
278
if (addNewline)
Original file line number Diff line number Diff line change @@ -2170,7 +2170,7 @@ void IRGenModule::emitSILWitnessTable(SILWitnessTable *wt) {
2170
2170
void IRGenModule::emitSILDifferentiabilityWitness (
2171
2171
SILDifferentiabilityWitness *dw) {
2172
2172
PrettyStackTraceDifferentiabilityWitness _st (
2173
- Context, " emitting differentiability witness for" , dw->getKey ());
2173
+ " emitting differentiability witness for" , dw->getKey ());
2174
2174
2175
2175
// Don't emit declarations.
2176
2176
if (dw->isDeclaration ())
You can’t perform that action at this time.
0 commit comments