Skip to content

Commit d42b752

Browse files
Apply suggestions from code review
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
1 parent b5c1ec8 commit d42b752

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

swift/extractor/SwiftOutputRewrite.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ void storeRemappingForVFS(const SwiftExtractorConfiguration& config,
251251
const std::unordered_map<std::string, std::string>& remapping) {
252252
// Only create remapping for the .swiftmodule files
253253
std::unordered_map<std::string, std::string> modules;
254-
for (auto& [oldPath, newPath] : remapping) {
254+
for (const auto& [oldPath, newPath] : remapping) {
255255
if (llvm::StringRef(oldPath).endswith(".swiftmodule")) {
256-
modules[oldPath] = newPath;
256+
modules.emplace(oldPath, newPath);
257257
}
258258
}
259259

0 commit comments

Comments
 (0)