31 auto &Old = ValuePtrs[Idx];
40 Value *PrevVal = Old.first;
41 if (PrevVal->
getType() != V->getType())
43 std::errc::illegal_byte_sequence,
44 "Assigned value does not match type of forward declaration");
45 Old.first->replaceAllUsesWith(V);
54 if (Idx >= RefsUpperBound)
60 if (
Value *V = ValuePtrs[Idx].first) {
62 if (Ty && Ty != V->getType())
80 ValuePtrs[Idx] = {V, TyID};
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This class represents an incoming formal argument to a Function.
LLVM Basic Block Representation.
Value * getValueFwdRef(unsigned Idx, Type *Ty, unsigned TyID, BasicBlock *ConstExprInsertBB)
void push_back(Value *V, unsigned TypeID)
Error assignValue(unsigned Idx, Value *V, unsigned TypeID)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
reference get()
Returns a reference to the stored T value.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
LLVM_ABI void deleteValue()
Delete a pointer to a generic Value.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
void consumeError(Error Err)
Consume a Error without doing anything.