mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-21 02:19:45 +00:00
IR: Add missing clone() overloads
Add missing specialized node overloads for `MDNode::clone()` (they were on most of the node types already, but missing from the others). `MDNode::clone()` returns `TempMDNode` (`std::unique_ptr<MDNode,...>`), while `TempMDSubrange::clone()` (for example) returns the more convenient `TempMDSubrange` (`std::unique_ptr<TempMDSubrange,...>`). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229579 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1217,6 +1217,8 @@ public:
|
||||
Metadata *Type, Metadata *Value),
|
||||
(Tag, Scope, Name, Type, Value))
|
||||
|
||||
TempMDTemplateValueParameter clone() const { return cloneImpl(); }
|
||||
|
||||
Metadata *getValue() const { return getOperand(3); }
|
||||
|
||||
static bool classof(const Metadata *MD) {
|
||||
@@ -1310,6 +1312,8 @@ public:
|
||||
(Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
|
||||
IsDefinition, Variable, StaticDataMemberDeclaration))
|
||||
|
||||
TempMDGlobalVariable clone() const { return cloneImpl(); }
|
||||
|
||||
bool isLocalToUnit() const { return IsLocalToUnit; }
|
||||
bool isDefinition() const { return IsDefinition; }
|
||||
StringRef getDisplayName() const { return getStringOperand(4); }
|
||||
@@ -1380,6 +1384,8 @@ public:
|
||||
Metadata *InlinedAt = nullptr),
|
||||
(Tag, Scope, Name, File, Line, Type, Arg, Flags, InlinedAt))
|
||||
|
||||
TempMDLocalVariable clone() const { return cloneImpl(); }
|
||||
|
||||
unsigned getArg() const { return Arg; }
|
||||
unsigned getFlags() const { return Flags; }
|
||||
Metadata *getInlinedAt() const { return getOperand(4); }
|
||||
@@ -1417,6 +1423,8 @@ class MDExpression : public DebugNode {
|
||||
public:
|
||||
DEFINE_MDNODE_GET(MDExpression, (ArrayRef<uint64_t> Elements), (Elements))
|
||||
|
||||
TempMDExpression clone() const { return cloneImpl(); }
|
||||
|
||||
ArrayRef<uint64_t> getElements() const { return Elements; }
|
||||
|
||||
unsigned getNumElements() const { return Elements.size(); }
|
||||
@@ -1562,6 +1570,8 @@ public:
|
||||
(Name, File, Line, GetterName, SetterName, Attributes,
|
||||
Type))
|
||||
|
||||
TempMDObjCProperty clone() const { return cloneImpl(); }
|
||||
|
||||
unsigned getLine() const { return Line; }
|
||||
unsigned getAttributes() const { return Attributes; }
|
||||
StringRef getName() const { return getStringOperand(0); }
|
||||
|
||||
Reference in New Issue
Block a user