File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,18 @@ enum class LLVMRustSynchronizationScope {
267
267
CrossThread,
268
268
};
269
269
270
+ #if LLVM_VERSION_GE(5, 0)
271
+ static SyncScope::ID fromRust (LLVMRustSynchronizationScope Scope) {
272
+ switch (Scope) {
273
+ case LLVMRustSynchronizationScope::SingleThread:
274
+ return SyncScope::SingleThread;
275
+ case LLVMRustSynchronizationScope::CrossThread:
276
+ return SyncScope::System;
277
+ default :
278
+ llvm_unreachable (" bad SynchronizationScope." );
279
+ }
280
+ }
281
+ #else
270
282
static SynchronizationScope fromRust (LLVMRustSynchronizationScope Scope) {
271
283
switch (Scope) {
272
284
case LLVMRustSynchronizationScope::SingleThread:
@@ -277,6 +289,7 @@ static SynchronizationScope fromRust(LLVMRustSynchronizationScope Scope) {
277
289
llvm_unreachable (" bad SynchronizationScope." );
278
290
}
279
291
}
292
+ #endif
280
293
281
294
extern " C" LLVMValueRef
282
295
LLVMRustBuildAtomicFence (LLVMBuilderRef B, LLVMAtomicOrdering Order,
You can’t perform that action at this time.
0 commit comments