mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 03:30:22 +00:00
Before existing NamedMDNode entry in the symbol table, remove any existing entry with the same name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c618c8aff4
commit
330186e547
@ -194,9 +194,15 @@ public:
|
|||||||
/// @name Mutators
|
/// @name Mutators
|
||||||
/// @{
|
/// @{
|
||||||
public:
|
public:
|
||||||
/// insert - The method inserts a new entry into the stringmap.
|
/// insert - The method inserts a new entry into the stringmap. This will
|
||||||
|
/// replace existing entry, if any.
|
||||||
void insert(StringRef Name, NamedMDNode *Node) {
|
void insert(StringRef Name, NamedMDNode *Node) {
|
||||||
(void) mmap.GetOrCreateValue(Name, Node);
|
StringMapEntry<NamedMDNode *> &Entry =
|
||||||
|
mmap.GetOrCreateValue(Name, Node);
|
||||||
|
if (Entry.getValue() != Node) {
|
||||||
|
mmap.remove(&Entry);
|
||||||
|
(void) mmap.GetOrCreateValue(Name, Node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This method removes a NamedMDNode from the symbol table.
|
/// This method removes a NamedMDNode from the symbol table.
|
||||||
|
Loading…
Reference in New Issue
Block a user