File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
include/swift/SILOptimizer/Differentiation Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,8 @@ ADContext::emitNondifferentiabilityError(SILValue value,
273
273
Diag<T...> diag, U &&... args) {
274
274
LLVM_DEBUG ({
275
275
getADDebugStream () << " Diagnosing non-differentiability.\n " ;
276
- getADDebugStream () << " For value:\n " << value;
276
+ auto &s = getADDebugStream () << " For value:\n " ;
277
+ value->printInContext (s);
277
278
getADDebugStream () << " With invoker:\n " << invoker << ' \n ' ;
278
279
});
279
280
// If instruction does not have a valid location, use the function location
@@ -290,7 +291,8 @@ ADContext::emitNondifferentiabilityError(SILInstruction *inst,
290
291
Diag<T...> diag, U &&... args) {
291
292
LLVM_DEBUG ({
292
293
getADDebugStream () << " Diagnosing non-differentiability.\n " ;
293
- getADDebugStream () << " For instruction:\n " << *inst;
294
+ auto &s = getADDebugStream () << " For instruction:\n " ;
295
+ inst->printInContext (s);
294
296
getADDebugStream () << " With invoker:\n " << invoker << ' \n ' ;
295
297
});
296
298
// If instruction does not have a valid location, use the function location
You can’t perform that action at this time.
0 commit comments