mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
IR: MDNode => Value: NamedMDNode::addOperand()
Change `NamedMDNode::addOperand()` to take a `Value *` instead of an `MDNode *`. This is part of PR21433. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -307,7 +307,7 @@ public:
|
|||||||
|
|
||||||
MDNode *getOperand(unsigned i) const;
|
MDNode *getOperand(unsigned i) const;
|
||||||
unsigned getNumOperands() const;
|
unsigned getNumOperands() const;
|
||||||
void addOperand(MDNode *M);
|
void addOperand(Value *M);
|
||||||
StringRef getName() const;
|
StringRef getName() const;
|
||||||
void print(raw_ostream &ROS) const;
|
void print(raw_ostream &ROS) const;
|
||||||
void dump() const;
|
void dump() const;
|
||||||
|
@@ -578,7 +578,8 @@ MDNode *NamedMDNode::getOperand(unsigned i) const {
|
|||||||
return &*getNMDOps(Operands)[i];
|
return &*getNMDOps(Operands)[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
void NamedMDNode::addOperand(MDNode *M) {
|
void NamedMDNode::addOperand(Value *V) {
|
||||||
|
auto *M = cast<MDNode>(V);
|
||||||
assert(!M->isFunctionLocal() &&
|
assert(!M->isFunctionLocal() &&
|
||||||
"NamedMDNode operands must not be function-local!");
|
"NamedMDNode operands must not be function-local!");
|
||||||
getNMDOps(Operands).push_back(TrackingVH<MDNode>(M));
|
getNMDOps(Operands).push_back(TrackingVH<MDNode>(M));
|
||||||
|
Reference in New Issue
Block a user