From 617f0d65b20b7b405b1acecea6f99ccd0a6d73f3 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 5 Jan 2023 20:25:01 +0000 Subject: deploy: 802cca1963bc27f8ea4e4923029909e45464d3df --- src/llvm_kaleidoscope_rs/llvm/basic_block.rs.html | 69 ++++++++++------------- 1 file changed, 31 insertions(+), 38 deletions(-) (limited to 'src/llvm_kaleidoscope_rs/llvm/basic_block.rs.html') diff --git a/src/llvm_kaleidoscope_rs/llvm/basic_block.rs.html b/src/llvm_kaleidoscope_rs/llvm/basic_block.rs.html index 581b8e2..2370022 100644 --- a/src/llvm_kaleidoscope_rs/llvm/basic_block.rs.html +++ b/src/llvm_kaleidoscope_rs/llvm/basic_block.rs.html @@ -1,10 +1,4 @@ -basic_block.rs - source -
1
+basic_block.rs - source
1
 2
 3
 4
@@ -43,45 +37,44 @@
 37
 38
 39
-
use llvm_sys::{core::LLVMGetBasicBlockParent, prelude::LLVMBasicBlockRef};
+
use llvm_sys::{core::LLVMGetBasicBlockParent, prelude::LLVMBasicBlockRef};
 
-use std::marker::PhantomData;
+use std::marker::PhantomData;
 
-use super::FnValue;
+use super::FnValue;
 
-/// Wrapper for a LLVM Basic Block.
-#[derive(Copy, Clone)]
-pub struct BasicBlock<'llvm>(LLVMBasicBlockRef, PhantomData<&'llvm ()>);
+/// Wrapper for a LLVM Basic Block.
+#[derive(Copy, Clone)]
+pub struct BasicBlock<'llvm>(LLVMBasicBlockRef, PhantomData<&'llvm ()>);
 
-impl<'llvm> BasicBlock<'llvm> {
-    /// Create a new BasicBlock instance.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `bb_ref` is a null pointer.
-    pub(super) fn new(bb_ref: LLVMBasicBlockRef) -> BasicBlock<'llvm> {
-        assert!(!bb_ref.is_null());
-        BasicBlock(bb_ref, PhantomData)
+impl<'llvm> BasicBlock<'llvm> {
+    /// Create a new BasicBlock instance.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `bb_ref` is a null pointer.
+    pub(super) fn new(bb_ref: LLVMBasicBlockRef) -> BasicBlock<'llvm> {
+        assert!(!bb_ref.is_null());
+        BasicBlock(bb_ref, PhantomData)
     }
 
-    /// Get the raw LLVM value reference.
-    #[inline]
-    pub(super) fn bb_ref(&self) -> LLVMBasicBlockRef {
-        self.0
-    }
+    /// Get the raw LLVM value reference.
+    #[inline]
+    pub(super) fn bb_ref(&self) -> LLVMBasicBlockRef {
+        self.0
+    }
 
-    /// Get the function to which the basic block belongs.
-    ///
-    /// # Panics
-    ///
-    /// Panics if LLVM API returns a `null` pointer.
-    pub fn get_parent(&self) -> FnValue<'llvm> {
-        let value_ref = unsafe { LLVMGetBasicBlockParent(self.bb_ref()) };
-        assert!(!value_ref.is_null());
+    /// Get the function to which the basic block belongs.
+    ///
+    /// # Panics
+    ///
+    /// Panics if LLVM API returns a `null` pointer.
+    pub fn get_parent(&self) -> FnValue<'llvm> {
+        let value_ref = unsafe { LLVMGetBasicBlockParent(self.bb_ref()) };
+        assert!(!value_ref.is_null());
 
-        FnValue::new(value_ref)
+        FnValue::new(value_ref)
     }
 }
 
-
- \ No newline at end of file +
\ No newline at end of file -- cgit v1.2.3