13#ifndef LLVM_SANDBOXIR_USE_H
14#define LLVM_SANDBOXIR_USE_H
34#define DEF_INSTR(ID, OPC, CLASS) class CLASS;
35#define DEF_DISABLE_AUTO_UNDEF
36#include "llvm/SandboxIR/ValuesDefFilesList.def"
50 : LLVMUse(LLVMUse), Usr(Usr), Ctx(&Ctx) {}
51 Use() : LLVMUse(
nullptr), Ctx(
nullptr) {}
53 friend ::llvm::sandboxir::Value;
54 friend ::llvm::sandboxir::User;
55 friend ::llvm::sandboxir::OperandUseIterator;
56 friend ::llvm::sandboxir::UserUseIterator;
57 friend ::llvm::sandboxir::CallBase;
58 friend ::llvm::sandboxir::PHINode;
60#define DEF_INSTR(ID, OPC, CLASS) friend ::llvm::sandboxir::CLASS;
61#define DEF_DISABLE_AUTO_UNDEF
62#include "llvm/SandboxIR/ValuesDefFilesList.def"
75 return LLVMUse ==
Other.LLVMUse && Usr ==
Other.Usr;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define LLVM_ABI_FOR_TEST
This defines the Use class.
A Use represents the edge between a Value definition and its users.
This class implements an extremely fast bulk output stream that can only output to a stream.
Iterator for the Use edges of a User's operands.
Represents a Def-use/Use-def edge in SandboxIR.
LLVM_ABI void set(Value *V)
LLVM_ABI unsigned getOperandNo() const
LLVM_ABI_FOR_TEST void dumpOS(raw_ostream &OS) const
LLVM_ABI void swap(Use &OtherUse)
bool operator==(const Use &Other) const
bool operator!=(const Use &Other) const
Context * getContext() const
class User * getUser() const
LLVM_ABI Value * get() const
Iterator for the Use edges of a Value's users.
A sandboxir::User has operands.
A SandboxIR Value has users. This is the base class.