mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Blocklist] Make sure blocklist config is read through VFS
Make sure block-list file is read through VFS so CASFS can be used to read the configuration to ensure sound caching, and also the path of the blocklist can be canonicalized via path remapping.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "swift/AST/SearchPathOptions.h"
|
||||
#include "swift/Basic/Defer.h"
|
||||
#include "swift/Basic/BlockList.h"
|
||||
#include "swift/Basic/SourceManager.h"
|
||||
|
||||
using namespace swift;
|
||||
|
||||
@@ -46,7 +47,8 @@ TEST(BlocklistTest, testYamlParsing) {
|
||||
ASSERT_FALSE(llvm::sys::fs::createUniqueDirectory(
|
||||
"BlocklistTest.testYamlParsing", temp));
|
||||
SWIFT_DEFER { llvm::sys::fs::remove_directories(temp); };
|
||||
BlockListStore store;
|
||||
SourceManager sm;
|
||||
BlockListStore store(sm);
|
||||
std::string path1, path2;
|
||||
ASSERT_FALSE(emitFileWithContents(temp, "block1.yaml",
|
||||
"---\n"
|
||||
|
||||
Reference in New Issue
Block a user