diff options
| author | Denis Merigoux <denis.merigoux@gmail.com> | 2018-08-21 18:15:29 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-11-16 14:11:09 +0200 |
| commit | b7615389978eae2ae9f3cba9a776fd8da3f743ca (patch) | |
| tree | 16b5b6da384a12abc0016a389b5d295d66fe999c /src/librustc_codegen_llvm/llvm | |
| parent | b6998662900290db23974e8a7ba3c3864330c368 (diff) | |
| download | rust-b7615389978eae2ae9f3cba9a776fd8da3f743ca.tar.gz rust-b7615389978eae2ae9f3cba9a776fd8da3f743ca.zip | |
Generalized SynchronisationScope for BuilderMethods
Diffstat (limited to 'src/librustc_codegen_llvm/llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/llvm/ffi.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 677c108edc3..8ac6e218d86 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -304,6 +304,16 @@ pub enum SynchronizationScope { CrossThread, } +impl SynchronizationScope { + pub fn from_generic(sc : traits::SynchronizationScope) -> Self { + match sc { + traits::SynchronizationScope::Other => SynchronizationScope::Other, + traits::SynchronizationScope::SingleThread => SynchronizationScope::SingleThread, + traits::SynchronizationScope::CrossThread => SynchronizationScope::CrossThread, + } + } +} + /// LLVMRustFileType #[derive(Copy, Clone)] #[repr(C)] |
