35 auto &Old = ValuePtrs[
Idx];
42 assert(!isa<Constant>(&*Old.first) &&
"Shouldn't update constant");
44 Value *PrevVal = Old.first;
45 if (PrevVal->
getType() != V->getType())
47 std::errc::illegal_byte_sequence,
48 "Assigned value does not match type of forward declaration");
49 Old.first->replaceAllUsesWith(V);
58 if (
Idx >= RefsUpperBound)
64 if (
Value *V = ValuePtrs[
Idx].first) {
66 if (Ty && Ty != V->getType())
84 ValuePtrs[
Idx] = {V, TyID};
This file contains the declarations for the subclasses of Constant, which represent the different fla...
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
TypeID
Definitions of all of the base types for the Type system.
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
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.
void consumeError(Error Err)
Consume a Error without doing anything.