Revert "serialization: obfuscate the serialized search paths"

This commit is contained in:
Saleem Abdulrasool
2021-12-02 08:18:23 -08:00
committed by GitHub
parent 8a7ca32cf0
commit 11d5d6d4ca
21 changed files with 27 additions and 139 deletions

View File

@@ -149,7 +149,7 @@ private:
SmallVector<Dependency, 8> Dependencies;
struct SearchPath {
std::string Path;
StringRef Path;
bool IsFramework;
bool IsSystem;
};
@@ -374,7 +374,7 @@ private:
std::unique_ptr<llvm::MemoryBuffer> moduleDocInputBuffer,
std::unique_ptr<llvm::MemoryBuffer> moduleSourceInfoInputBuffer,
bool isFramework, bool requiresOSSAModules,
serialization::ValidationInfo &info, PathObfuscator &pathRecoverer);
serialization::ValidationInfo &info);
/// Change the status of the current module.
Status error(Status issue) {
@@ -464,7 +464,7 @@ private:
/// Loads data from #ModuleDocInputBuffer.
///
/// Returns false if there was an error.
bool readModuleDocIfPresent(PathObfuscator &pathRecoverer);
bool readModuleDocIfPresent();
/// Reads the source loc block, which contains USR to decl location mapping.
///
@@ -474,7 +474,7 @@ private:
/// Loads data from #ModuleSourceInfoInputBuffer.
///
/// Returns false if there was an error.
bool readModuleSourceInfoIfPresent(PathObfuscator &pathRecoverer);
bool readModuleSourceInfoIfPresent();
/// Read an on-disk decl hash table stored in
/// \c sourceinfo_block::DeclUSRSLayout format.
@@ -510,13 +510,12 @@ public:
std::unique_ptr<llvm::MemoryBuffer> moduleDocInputBuffer,
std::unique_ptr<llvm::MemoryBuffer> moduleSourceInfoInputBuffer,
bool isFramework, bool requiresOSSAModules,
PathObfuscator &pathRecoverer,
std::shared_ptr<const ModuleFileSharedCore> &theModule) {
serialization::ValidationInfo info;
auto *core = new ModuleFileSharedCore(
std::move(moduleInputBuffer), std::move(moduleDocInputBuffer),
std::move(moduleSourceInfoInputBuffer), isFramework,
requiresOSSAModules, info, pathRecoverer);
requiresOSSAModules, info);
if (!moduleInterfacePath.empty()) {
ArrayRef<char> path;
core->allocateBuffer(path, moduleInterfacePath);