From a71114cdf5f0827bb5583ef9491265385410a202 Mon Sep 17 00:00:00 2001 From: Gregoire Geis Date: Fri, 29 Sep 2017 23:20:40 +0200 Subject: [PATCH] Documented instruction clone; added instruction copy --- src/values/instruction_value.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/values/instruction_value.rs b/src/values/instruction_value.rs index 5ef8659b60eab..5837ffeaa9d27 100644 --- a/src/values/instruction_value.rs +++ b/src/values/instruction_value.rs @@ -151,7 +151,7 @@ impl InstructionOpcode { } } -#[derive(Debug, PartialEq, Eq)] +#[derive(Debug, PartialEq, Eq, Copy)] pub struct InstructionValue { instruction_value: Value, } @@ -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())