Skip to content

Commit

Permalink
Documented instruction clone; added instruction copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregoire Geis committed Sep 29, 2017
1 parent 4a569a4 commit a71114c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/values/instruction_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl InstructionOpcode {
}
}

#[derive(Debug, PartialEq, Eq)]
#[derive(Debug, PartialEq, Eq, Copy)]
pub struct InstructionValue {
instruction_value: Value,
}
Expand Down Expand Up @@ -231,6 +231,8 @@ impl InstructionValue {
}

impl Clone for InstructionValue {
/// Creates a clone of this `InstructionValue`, and returns it.
/// The clone will have no parent, and no name.
fn clone(&self) -> Self {
let value = unsafe {
LLVMInstructionClone(self.as_value_ref())
Expand Down

0 comments on commit a71114c

Please sign in to comment.