Files
revng-revng/lib/Storage/StorageClient.cpp
Giacomo Vercesi 93d3a6238d revng: introduce S3 support
Add the capability for all revng tooling to run with an S3-backed
workdir.
2023-09-06 15:23:43 +02:00

22 lines
579 B
C++

/// \file StorageClient.cpp
/// \brief Opaque interface to file-related operations
//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
#include "revng/Storage/StorageClient.h"
#include "LocalStorageClient.h"
#include "S3StorageClient.h"
llvm::Expected<std::unique_ptr<revng::StorageClient>>
revng::StorageClient::fromPathOrURL(llvm::StringRef URL) {
revng_assert(not URL.empty());
if (S3StorageClient::isS3URL(URL)) {
return S3StorageClient::fromURL(URL);
} else {
return std::make_unique<revng::LocalStorageClient>(URL);
}
}