@@ -72,18 +72,6 @@ class ActionCache {
72
72
return getImpl (arrayRefFromStringRef (ActionKey.getKey ()), Globally);
73
73
}
74
74
75
- // / Asynchronous version of \c get.
76
- std::future<AsyncCASIDValue> getFuture (const CacheKey &ActionKey,
77
- bool Globally = false ) const ;
78
-
79
- // / Asynchronous version of \c get.
80
- void getAsync (
81
- const CacheKey &ActionKey, bool Globally,
82
- unique_function<void (Expected<std::optional<CASID>>)> Callback) const {
83
- return getImplAsync (arrayRefFromStringRef (ActionKey.getKey ()), Globally,
84
- std::move (Callback));
85
- }
86
-
87
75
// / Cache \p Result for the \p ActionKey computation.
88
76
// /
89
77
// / \param Globally if true it is a hint to the underlying implementation that
@@ -97,6 +85,23 @@ class ActionCache {
97
85
return putImpl (arrayRefFromStringRef (ActionKey.getKey ()), Result, Globally);
98
86
}
99
87
88
+
89
+ #ifndef _MSC_VER
90
+ // / FIXME: MSVC doesn't compile Error within Promise/Future correctly and will
91
+ // / result in unchecked error. Disable AsyncAPIs when using MSVC for now.
92
+
93
+ // / Asynchronous version of \c get.
94
+ std::future<AsyncCASIDValue> getFuture (const CacheKey &ActionKey,
95
+ bool Globally = false ) const ;
96
+
97
+ // / Asynchronous version of \c get.
98
+ void getAsync (
99
+ const CacheKey &ActionKey, bool Globally,
100
+ unique_function<void (Expected<std::optional<CASID>>)> Callback) const {
101
+ return getImplAsync (arrayRefFromStringRef (ActionKey.getKey ()), Globally,
102
+ std::move (Callback));
103
+ }
104
+
100
105
// / Asynchronous version of \c put.
101
106
std::future<AsyncErrorValue> putFuture (const CacheKey &ActionKey,
102
107
const CASID &Result,
@@ -111,6 +116,7 @@ class ActionCache {
111
116
return putImplAsync (arrayRefFromStringRef (ActionKey.getKey ()), Result,
112
117
Globally, std::move (Callback));
113
118
}
119
+ #endif
114
120
115
121
virtual ~ActionCache () = default ;
116
122
0 commit comments