Skip to content

Commit ccdc8ef

Browse files
committed
AutoDiff: repair the test on Windows
The name of the module is encoded into the type name. The module name is not `null` on Windows, which would fail to match the name. It is possible to make the test less overly-constricted, but setting the module name to null is simpler and avoids more regex matching.
1 parent 0366e61 commit ccdc8ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/AutoDiff/validation-test/simple_math.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-run-simple-swift
22
// NOTE(TF-813): verify that enabling forward-mode does not affect reverse-mode.
33
// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-forward-mode-differentiation)
4-
// RUN: %target-swift-frontend -Xllvm -sil-print-after=differentiation %s -emit-sil -o /dev/null 2>&1 | %FileCheck %s
4+
// RUN: %target-swift-frontend -Xllvm -sil-print-after=differentiation %s -emit-sil -o /dev/null -module-name null 2>&1 | %FileCheck %s
55
// REQUIRES: executable_test
66

77
import StdlibUnittest
@@ -367,7 +367,7 @@ SimpleMathTests.test("ForceUnwrapping") {
367367
}
368368

369369
// CHECK-LABEL: sil private [ossa] @AD__${{.*}}jumpTimesTwo{{.*}}pullback_src_0_wrt_0 : $@convention(thin) (Float, @owned _AD__$s4nullyycfU18_12jumpTimesTwoL_5modelSfAAyycfU18_14SmallTestModelL_V_tF_bb0__PB__src_0_wrt_0) -> SmallTestModel.TangentVector {
370-
// CHECK: bb0([[DX:%.*]] : $Float, [[PB_STRUCT:%.*]] : {{.*}}):
370+
// CHECK: bb0([[DX:%.*]] : $Float, [[PB_STRUCT:%.*]] : {{.*}}):
371371
// CHECK: ([[PB0:%.*]], [[PB1:%.*]]) = destructure_struct [[PB_STRUCT]]
372372
// CHECK: [[ADJ_TUPLE:%.*]] = apply [[PB1]]([[DX]]) : $@callee_guaranteed (Float) -> (Float, Float)
373373
// CHECK: ([[TMP0:%.*]], [[ADJ_CONCRETE:%.*]]) = destructure_tuple [[ADJ_TUPLE]] : $(Float, Float)

0 commit comments

Comments
 (0)