diff options
Diffstat (limited to 'lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h')
-rw-r--r-- | lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h b/lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h new file mode 100644 index 000000000000..5a2f3bf9b516 --- /dev/null +++ b/lang/swift510/files/patch-swift_include_swift_SILOptimizer_Differentiation_DifferentiationInvoker.h @@ -0,0 +1,15 @@ +--- swift/include/swift/SILOptimizer/Differentiation/DifferentiationInvoker.h.orig 2024-06-06 04:26:30 UTC ++++ swift/include/swift/SILOptimizer/Differentiation/DifferentiationInvoker.h +@@ -60,7 +60,12 @@ struct DifferentiationInvoker { (private) + + private: + Kind kind; ++#if defined(__FreeBSD__) ++ // Workaround. On FreeBSD you can't have an std::pair in a union. ++ struct Value { ++#else + union Value { ++#endif + /// The instruction associated with the `DifferentiableFunctionInst` case. + DifferentiableFunctionInst *diffFuncInst; + Value(DifferentiableFunctionInst *inst) : diffFuncInst(inst) {} |