#pragma once #include #include #include namespace codeql { // Rewrites all the output CLI args to point to a scratch dir instead of the actual locations. // This is needed to ensure that the artifacts produced by the extractor do not collide with the // artifacts produced by the actual Swift compiler. // Returns the map containing remapping oldpath -> newPath. std::unordered_map rewriteOutputsInPlace( const std::string& scratchDir, std::vector& CLIArgs); // Create directories for all the redirected new paths as the Swift compiler expects them to exist. void ensureDirectoriesForNewPathsExist( const std::unordered_map& remapping); } // namespace codeql