llvm::UnaryOperator::Create

Create a unary instruction with the given opcode and operand.

Synopsis

Declared in <llvm/IR/InstrTypes.h>

static
UnaryOperator*
Create(
    UnaryOps Op,
    Value* S,
    Twine const& Name = Twine(),
    InsertPosition InsertBefore = nullptr);

Description

Optionally (if InstBefore is specified) insert the instruction into a BasicBlock right before the specified instruction. The specified Instruction is allowed to be a dereferenced end iterator.

Return Value

The newly created unary operator.

Parameters

NameDescription
OpThe unary opcode.
SThe operand value.
NameOptional name for the new instruction.
InsertBeforeOptional insertion point for the new instruction.