16 return cast<FunctionType>(
24 cast<llvm::Function>(
Val)->setAlignment(
Align);
29 auto *
F = cast<llvm::Function>(
Val);
30 OS << *
F->getReturnType() <<
" @" <<
F->getName() <<
"(";
34 auto *SBArg = cast_or_null<Argument>(Ctx.getValue(&LLVMArg));
38 SBArg->printAsOperand(OS);
47 auto *LLVMF = cast<llvm::Function>(
Val);
51 auto *BB = cast_or_null<BasicBlock>(
Ctx.
getValue(&LLVMBB));
57 [&
OS] {
OS <<
"\n"; });
This class represents an incoming formal argument to a Function.
LLVM Basic Block Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI sandboxir::Value * getValue(llvm::Value *V) const
Type * getType(llvm::Type *LLVMTy)
LLVM_ABI FunctionType * getFunctionType() const
void dumpOS(raw_ostream &OS) const final
LLVM_ABI void setAlignment(MaybeAlign Align)
Sets the alignment attribute of the Function.
void dumpNameAndArgs(raw_ostream &OS) const
This class can be used for tracking most instruction setters.
bool emplaceIfTracking(ArgsT... Args)
A convenience wrapper for track() that constructs and tracks the Change object if tracking is enabled...
llvm::Value * Val
The LLVM Value that corresponds to this SandboxIR Value.
Context & Ctx
All values point to the context.
void interleave(ForwardIterator begin, ForwardIterator end, UnaryFunctor each_fn, NullaryFunctor between_fn)
An STL-style algorithm similar to std::for_each that applies a second functor between every pair of e...
This struct is a compact representation of a valid (non-zero power of two) alignment.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.