Skip to content

Commit 522d48a

Browse files
AlexDenisovjketema
andauthored
Apply suggestions from code review
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
1 parent 4d81206 commit 522d48a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

swift/extractor/SwiftOutputRewrite.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <iostream>
1313

1414
// Creates a copy of the output file map and updated remapping table in place
15-
// It does not change the original map file as it is dependent upon by the original compiler
15+
// It does not change the original map file as it is depended upon by the original compiler
1616
// Returns path to the newly created output file map on success, or None in a case of failure
1717
static std::optional<std::string> rewriteOutputFileMap(
1818
const codeql::SwiftExtractorConfiguration& config,
@@ -58,7 +58,7 @@ static std::optional<std::string> rewriteOutputFileMap(
5858
return newPath;
5959
}
6060

61-
// This is Xcode-specific workaround to produce alias names for an existing .swiftmodule file.
61+
// This is an Xcode-specific workaround to produce alias names for an existing .swiftmodule file.
6262
// In the case of Xcode, it calls the Swift compiler and asks it to produce a Swift module.
6363
// Once it's done, Xcode moves the .swiftmodule file in another location, and the location is
6464
// rather arbitrary. Here are examples of such locations:
@@ -84,10 +84,10 @@ static std::optional<std::string> rewriteOutputFileMap(
8484
// The <Triple> here is a normalized target triple (e.g. arm64-apple-iphoneos15.4 ->
8585
// arm64-apple-iphoneos).
8686
//
87-
// This method construct those aliases for a module only if it comes from Xcode, which is detected
88-
// by the presence of `Intermediates.noindex` directory in the module path.
87+
// This method constructs those aliases for a module only if it comes from Xcode, which is detected
88+
// by the presence of an `Intermediates.noindex` directory in the module path.
8989
//
90-
// In the case of Swift Package Manager (`swift build`) this is not needed.
90+
// In the case of the Swift Package Manager (`swift build`) this is not needed.
9191
static std::vector<std::string> computeModuleAliases(llvm::StringRef modulePath,
9292
const std::string& targetTriple) {
9393
if (modulePath.empty()) {

swift/extractor/SwiftOutputRewrite.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ std::unordered_map<std::string, std::string> rewriteOutputsInPlace(
1616
SwiftExtractorConfiguration& config,
1717
std::vector<std::string>& CLIArgs);
1818

19-
// Recreate all the redirected new paths as the Swift compiler expects them to be present
20-
void ensureNewPathsExist(const std::unordered_map<std::string, std::string>& remapping);
19+
// Create directories for all the redirected new paths as the Swift compiler expects them to exist.
20+
void ensureDirectoriesForNewPathsExist(const std::unordered_map<std::string, std::string>& remapping);
2121

2222
// Stores remapped `.swiftmoduile`s in a YAML file for later consumption by the
2323
// llvm::RedirectingFileSystem via Swift's VFSOverlayFiles.

0 commit comments

Comments
 (0)