From 73e25a571f12d3deaa6f4493a5b4792a9dae39eb Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 24 Sep 2022 22:38:40 +0000 Subject: deploy: 295081130ca1eed6e67dfc035e2df2c9ed49b174 --- src/llvm_kaleidoscope_rs/llvm/lljit.rs.html | 234 ++++++++++++++-------------- 1 file changed, 119 insertions(+), 115 deletions(-) (limited to 'src/llvm_kaleidoscope_rs/llvm/lljit.rs.html') diff --git a/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html b/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html index 8abbc19..5a5a376 100644 --- a/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html +++ b/src/llvm_kaleidoscope_rs/llvm/lljit.rs.html @@ -1,102 +1,108 @@ -lljit.rs - source
  1
-  2
-  3
-  4
-  5
-  6
-  7
-  8
-  9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
+lljit.rs - source
+    
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
 100
 101
 102
@@ -152,8 +158,7 @@
 152
 153
 154
-
-use llvm_sys::orc2::{
+
use llvm_sys::orc2::{
     lljit::{
         LLVMOrcCreateLLJIT, LLVMOrcLLJITAddLLVMIRModuleWithRT, LLVMOrcLLJITGetGlobalPrefix,
         LLVMOrcLLJITGetMainJITDylib, LLVMOrcLLJITLookup, LLVMOrcLLJITRef,
@@ -167,12 +172,12 @@
 use std::marker::PhantomData;
 
 use super::{Error, Module};
-use crate::SmallCStr;
+use crate::SmallCStr;
 
 /// Marker trait to constrain function signatures that can be looked up in the JIT.
 pub trait JitFn {}
 
-impl JitFn for unsafe extern "C" fn() -> f64 {}
+impl JitFn for unsafe extern "C" fn() -> f64 {}
 
 /// Wrapper for a LLVM [LLJIT](https://www.llvm.org/docs/ORCv2.html#lljit-and-lllazyjit).
 pub struct LLJit {
@@ -186,11 +191,11 @@
     /// # Panics
     ///
     /// Panics if LLVM API returns a `null` pointer or an error.
-    pub fn new() -> LLJit {
+    pub fn new() -> LLJit {
         let (jit, dylib) = unsafe {
             let mut jit = std::ptr::null_mut();
             let err = LLVMOrcCreateLLJIT(
-                &mut jit as _,
+                &mut jit as _,
                 std::ptr::null_mut(), /* builder: nullptr -> default */
             );
 
@@ -213,7 +218,7 @@
     /// # Panics
     ///
     /// Panics if LLVM API returns a `null` pointer or an error.
-    pub fn add_module(&self, module: Module) -> ResourceTracker<'_> {
+    pub fn add_module(&self, module: Module) -> ResourceTracker<'_> {
         let tsmod = module.into_raw_thread_safe_module();
 
         let rt = unsafe {
@@ -235,13 +240,13 @@
     /// # Panics
     ///
     /// Panics if the symbol is not found in the JIT.
-    pub fn find_symbol<F: JitFn>(&self, sym: &str) -> F {
+    pub fn find_symbol<F: JitFn>(&self, sym: &str) -> F {
         let sym =
             SmallCStr::try_from(sym).expect("Failed to convert 'sym' argument to small C string!");
 
         unsafe {
             let mut addr = 0u64;
-            let err = LLVMOrcLLJITLookup(self.jit, &mut addr as _, sym.as_ptr());
+            let err = LLVMOrcLLJITLookup(self.jit, &mut addr as _, sym.as_ptr());
 
             if let Some(err) = Error::from(err) {
                 panic!("Error: {}", err.as_str());
@@ -261,7 +266,7 @@
         unsafe {
             let mut proc_syms_gen: LLVMOrcDefinitionGeneratorRef = std::ptr::null_mut();
             let err = LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess(
-                &mut proc_syms_gen as _,
+                &mut proc_syms_gen as _,
                 self.global_prefix(),
                 None,                 /* filter */
                 std::ptr::null_mut(), /* filter ctx */
@@ -276,7 +281,7 @@
     }
 
     /// Return the global prefix character according to the LLJITs data layout.
-    fn global_prefix(&self) -> libc::c_char {
+    fn global_prefix(&self) -> libc::c_char {
         unsafe { LLVMOrcLLJITGetGlobalPrefix(self.jit) }
     }
 }
@@ -288,14 +293,14 @@
 pub struct ResourceTracker<'jit>(LLVMOrcResourceTrackerRef, PhantomData<&'jit ()>);
 
 impl<'jit> ResourceTracker<'jit> {
-    fn new(rt: LLVMOrcResourceTrackerRef) -> ResourceTracker<'jit> {
+    fn new(rt: LLVMOrcResourceTrackerRef) -> ResourceTracker<'jit> {
         assert!(!rt.is_null());
         ResourceTracker(rt, PhantomData)
     }
 }
 
 impl Drop for ResourceTracker<'_> {
-    fn drop(&mut self) {
+    fn drop(&mut self) {
         unsafe {
             let err = LLVMOrcResourceTrackerRemove(self.0);
 
@@ -307,7 +312,6 @@
         };
     }
 }
-
-
- +
+
\ No newline at end of file -- cgit v1.2.3