aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-01-09 01:44:59 +0000
committerDevang Patel <dpatel@apple.com>2010-01-09 01:44:59 +0000
commit87df867fd7f23cd2128a7ee38f4cebeb85e948a2 (patch)
tree841eb85479d7e5665734222ef27cde30548e6f45
parentd2035203a0359eedbc1cf4ae77d43176e8455cd4 (diff)
Delete NamedMDSymTable while destrucing Module.
Disable copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93041 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ValueSymbolTable.h5
-rw-r--r--lib/VMCore/Module.cpp1
-rw-r--r--lib/VMCore/ValueSymbolTable.cpp2
3 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/ValueSymbolTable.h b/include/llvm/ValueSymbolTable.h
index e5ea49f39b..060dba3101 100644
--- a/include/llvm/ValueSymbolTable.h
+++ b/include/llvm/ValueSymbolTable.h
@@ -135,10 +135,11 @@ private:
class MDSymbolTable {
/// @name Types
/// @{
-public:
+private:
/// @brief A mapping of names to metadata
typedef StringMap<NamedMDNode*> MDMap;
+public:
/// @brief An iterator over a ValueMap.
typedef MDMap::iterator iterator;
@@ -150,6 +151,8 @@ public:
/// @{
public:
+ MDSymbolTable(const MDNode &); // DO NOT IMPLEMENT
+ void operator=(const MDSymbolTable &); // DO NOT IMPLEMENT
MDSymbolTable() : mmap(0) {}
~MDSymbolTable();
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index e25a29517a..03b1252849 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -71,6 +71,7 @@ Module::~Module() {
NamedMDList.clear();
delete ValSymTab;
delete TypeSymTab;
+ delete NamedMDSymTab;
}
/// Target endian information...
diff --git a/lib/VMCore/ValueSymbolTable.cpp b/lib/VMCore/ValueSymbolTable.cpp
index 98b042f739..d30a9d6e37 100644
--- a/lib/VMCore/ValueSymbolTable.cpp
+++ b/lib/VMCore/ValueSymbolTable.cpp
@@ -119,3 +119,5 @@ void ValueSymbolTable::dump() const {
//DEBUG(dbgs() << "\n");
}
}
+
+MDSymbolTable::~MDSymbolTable() { }