diff options
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 8ddbffc..eb23b12 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -71,8 +71,8 @@ template class llvm::SymbolTableListTraits<GlobalIFunc>; // Module::Module(StringRef MID, LLVMContext &C) - : Context(C), Materializer(), ModuleID(MID), SourceFileName(MID), DL("") { - ValSymTab = new ValueSymbolTable(); + : Context(C), ValSymTab(std::make_unique<ValueSymbolTable>()), + Materializer(), ModuleID(MID), SourceFileName(MID), DL("") { Context.addModule(this); } @@ -83,9 +83,6 @@ Module::~Module() { FunctionList.clear(); AliasList.clear(); IFuncList.clear(); - NamedMDList.clear(); - NamedMDSymTab.clear(); - delete ValSymTab; } std::unique_ptr<RandomNumberGenerator> Module::createRNG(const Pass* P) const { |