Loading llvm/include/llvm/IR/Module.h +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ private: IFuncListType IFuncList; ///< The IFuncs in the module NamedMDListType NamedMDList; ///< The named metadata in the module std::string GlobalScopeAsm; ///< Inline Asm at global scope. ValueSymbolTable *ValSymTab; ///< Symbol table for values std::unique_ptr<ValueSymbolTable> ValSymTab; ///< Symbol table for values ComdatSymTabType ComdatSymTab; ///< Symbol table for COMDATs std::unique_ptr<MemoryBuffer> OwnedMemoryBuffer; ///< Memory buffer directly owned by this Loading llvm/lib/IR/Module.cpp +2 −5 Original line number Diff line number Diff line Loading @@ -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); } Loading @@ -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 { Loading Loading
llvm/include/llvm/IR/Module.h +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ private: IFuncListType IFuncList; ///< The IFuncs in the module NamedMDListType NamedMDList; ///< The named metadata in the module std::string GlobalScopeAsm; ///< Inline Asm at global scope. ValueSymbolTable *ValSymTab; ///< Symbol table for values std::unique_ptr<ValueSymbolTable> ValSymTab; ///< Symbol table for values ComdatSymTabType ComdatSymTab; ///< Symbol table for COMDATs std::unique_ptr<MemoryBuffer> OwnedMemoryBuffer; ///< Memory buffer directly owned by this Loading
llvm/lib/IR/Module.cpp +2 −5 Original line number Diff line number Diff line Loading @@ -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); } Loading @@ -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 { Loading