Skip to content

Commit a6e21f2

Browse files
Fix some clang-tidy suggested issues 2
1 parent 4ba5027 commit a6e21f2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Interpreter/CppInterOp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,10 +3552,10 @@ namespace Cpp {
35523552

35533553
// Lazy materialization unit class helper
35543554
class AutoloadLibraryMU : public llvm::orc::MaterializationUnit {
3555-
const std::string lib;
3555+
std::string lib;
35563556
llvm::orc::SymbolNameVector syms;
35573557
public:
3558-
AutoloadLibraryMU(const std::string Library, const llvm::orc::SymbolNameVector &Symbols)
3558+
AutoloadLibraryMU(const std::string& Library, const llvm::orc::SymbolNameVector &Symbols)
35593559
: MaterializationUnit({getSymbolFlagsMap(Symbols), nullptr}), lib(Library), syms(Symbols) {}
35603560

35613561
[[nodiscard]] StringRef getName() const override {

lib/Interpreter/DynamicLibraryManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ namespace Cpp {
392392
return;
393393

394394
DyLibHandle dyLibHandle = nullptr;
395-
for (DyLibs::const_iterator I = m_DyLibs.begin(), E = m_DyLibs.end(); I != E; ++I) {
396-
if (I->second == canonicalLoadedLib) {
397-
dyLibHandle = I->first;
395+
for (const auto& dylib : m_DyLibs) {
396+
if (dylib.second == canonicalLoadedLib) {
397+
dyLibHandle = dylib.first;
398398
break;
399399
}
400400
}

0 commit comments

Comments
 (0)