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,
273273 Diag<T...> diag, U &&... args) {
274274 LLVM_DEBUG ({
275275 getADDebugStream () << " Diagnosing non-differentiability.\n " ;
276- getADDebugStream () << " For value:\n " << value;
276+ auto &s = getADDebugStream () << " For value:\n " ;
277+ value->printInContext (s);
277278 getADDebugStream () << " With invoker:\n " << invoker << ' \n ' ;
278279 });
279280 // If instruction does not have a valid location, use the function location
@@ -290,7 +291,8 @@ ADContext::emitNondifferentiabilityError(SILInstruction *inst,
290291 Diag<T...> diag, U &&... args) {
291292 LLVM_DEBUG ({
292293 getADDebugStream () << " Diagnosing non-differentiability.\n " ;
293- getADDebugStream () << " For instruction:\n " << *inst;
294+ auto &s = getADDebugStream () << " For instruction:\n " ;
295+ inst->printInContext (s);
294296 getADDebugStream () << " With invoker:\n " << invoker << ' \n ' ;
295297 });
296298 // If instruction does not have a valid location, use the function location
You can’t perform that action at this time.
0 commit comments