mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Use ilist_tratis to autoinsert and remove NamedMDNode from MDSymbolTable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,6 +57,7 @@ template<> struct ilist_traits<GlobalAlias>
|
||||
static GlobalAlias *createSentinel();
|
||||
static void destroySentinel(GlobalAlias *GA) { delete GA; }
|
||||
};
|
||||
|
||||
template<> struct ilist_traits<NamedMDNode>
|
||||
: public SymbolTableListTraits<NamedMDNode, Module> {
|
||||
// createSentinel is used to get hold of a node that marks the end of
|
||||
@@ -69,6 +70,8 @@ template<> struct ilist_traits<NamedMDNode>
|
||||
NamedMDNode *provideInitialHead() const { return createSentinel(); }
|
||||
NamedMDNode *ensureHead(NamedMDNode*) const { return createSentinel(); }
|
||||
static void noteHead(NamedMDNode*, NamedMDNode*) {}
|
||||
void addNodeToList(NamedMDNode *N);
|
||||
void removeNodeFromList(NamedMDNode *N);
|
||||
private:
|
||||
mutable ilist_node<NamedMDNode> Sentinel;
|
||||
};
|
||||
@@ -324,10 +327,6 @@ public:
|
||||
/// NamedMDNode with the specified name is not found.
|
||||
NamedMDNode *getOrInsertNamedMetadata(StringRef Name);
|
||||
|
||||
/// addMDNodeName - Insert an entry in the NamedMDNode symbol table mapping
|
||||
/// Name to NMD.
|
||||
void addMDNodeName(StringRef Name, NamedMDNode *NMD);
|
||||
|
||||
/// @}
|
||||
/// @name Type Accessors
|
||||
/// @{
|
||||
|
Reference in New Issue
Block a user