mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Delete the CollectorNamePool if it should become empty.
llvm-svn: 44775
This commit is contained in:
parent
fbd6134a51
commit
aadbdd1a62
@ -70,6 +70,10 @@ namespace llvm {
|
||||
/// reference-counted pointer to it. No additional memory is allocated if
|
||||
/// the string already exists in the pool.
|
||||
inline PooledStringPtr intern(const char *Str);
|
||||
|
||||
/// empty - Checks whether the pool is empty. Returns true if so.
|
||||
///
|
||||
inline bool empty() const { return InternTable.empty(); }
|
||||
};
|
||||
|
||||
/// PooledStringPtr - A pointer to an interned string. Use operator bool to
|
||||
|
@ -414,6 +414,10 @@ void Function::clearCollector() {
|
||||
if (CollectorNames->empty()) {
|
||||
delete CollectorNames;
|
||||
CollectorNames = 0;
|
||||
if (CollectorNamePool->empty()) {
|
||||
delete CollectorNamePool;
|
||||
CollectorNamePool = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user