From b398c94c821edd3e8699026dc00501062eafd5b2 Mon Sep 17 00:00:00 2001 From: Lukas Zaoral Date: Thu, 10 Sep 2020 17:12:28 +0200 Subject: llvm11: Make conversions from StringRef to std::string explicit The same applies to SmallString. See: llvm/llvm-project@777180a#diff-497ba4c0c527a125d382b51a34f32542 --- lib/Module/ModuleUtil.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/Module/ModuleUtil.cpp') diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index 2316ef45..7cd66415 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -82,11 +82,11 @@ GetAllUndefinedSymbols(Module *M, std::set &UndefinedSymbols) { for (auto const &Function : *M) { if (Function.hasName()) { if (Function.isDeclaration()) - UndefinedSymbols.insert(Function.getName()); + UndefinedSymbols.insert(Function.getName().str()); else if (!Function.hasLocalLinkage()) { assert(!Function.hasDLLImportStorageClass() && "Found dllimported non-external symbol!"); - DefinedSymbols.insert(Function.getName()); + DefinedSymbols.insert(Function.getName().str()); } } } @@ -95,18 +95,17 @@ GetAllUndefinedSymbols(Module *M, std::set &UndefinedSymbols) { I != E; ++I) if (I->hasName()) { if (I->isDeclaration()) - UndefinedSymbols.insert(I->getName()); + UndefinedSymbols.insert(I->getName().str()); else if (!I->hasLocalLinkage()) { assert(!I->hasDLLImportStorageClass() && "Found dllimported non-external symbol!"); - DefinedSymbols.insert(I->getName()); + DefinedSymbols.insert(I->getName().str()); } } for (Module::const_alias_iterator I = M->alias_begin(), E = M->alias_end(); I != E; ++I) if (I->hasName()) - DefinedSymbols.insert(I->getName()); - + DefinedSymbols.insert(I->getName().str()); // Prune out any defined symbols from the undefined symbols set // and other symbols we don't want to treat as an undefined symbol -- cgit 1.4.1