std::map<std::string, Replacements> FileToReplaces;
llvm::IntrusiveRefCntPtr<vfs::InMemoryFileSystem> VFS(
new vfs::InMemoryFileSystem());
- FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
+ FileManager FileMgr(FileSystemOptions(), VFS);
#if !defined(LLVM_ON_WIN32)
StringRef Path1 = "a/b/.././c.h";
StringRef Path2 = "a/c.h";
EXPECT_TRUE(VFS->addFile(Path2, 0, llvm::MemoryBuffer::getMemBuffer("")));
FileToReplaces[Path1] = Replacements();
FileToReplaces[Path2] = Replacements();
- FileToReplaces = groupReplacementsByFile(*FileMgr, FileToReplaces);
+ FileToReplaces = groupReplacementsByFile(FileMgr, FileToReplaces);
EXPECT_EQ(1u, FileToReplaces.size());
EXPECT_EQ(Path1, FileToReplaces.begin()->first);
}
std::map<std::string, Replacements> FileToReplaces;
llvm::IntrusiveRefCntPtr<vfs::InMemoryFileSystem> VFS(
new vfs::InMemoryFileSystem());
- FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
+ FileManager FileMgr(FileSystemOptions(), VFS);
#if !defined(LLVM_ON_WIN32)
StringRef Path1 = "./a/b/c.h";
StringRef Path2 = "a/b/c.h";
EXPECT_TRUE(VFS->addFile(Path2, 0, llvm::MemoryBuffer::getMemBuffer("")));
FileToReplaces[Path1] = Replacements();
FileToReplaces[Path2] = Replacements();
- FileToReplaces = groupReplacementsByFile(*FileMgr, FileToReplaces);
+ FileToReplaces = groupReplacementsByFile(FileMgr, FileToReplaces);
EXPECT_EQ(1u, FileToReplaces.size());
EXPECT_EQ(Path1, FileToReplaces.begin()->first);
}
std::map<std::string, Replacements> FileToReplaces;
llvm::IntrusiveRefCntPtr<vfs::InMemoryFileSystem> VFS(
new vfs::InMemoryFileSystem());
- FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS);
+ FileManager FileMgr(FileSystemOptions(), VFS);
#if !defined(LLVM_ON_WIN32)
StringRef Path1 = "./a/b/c.h";
StringRef Path2 = "a/b/c.h";
#endif
FileToReplaces[Path1] = Replacements();
FileToReplaces[Path2] = Replacements();
- FileToReplaces = groupReplacementsByFile(*FileMgr, FileToReplaces);
+ FileToReplaces = groupReplacementsByFile(FileMgr, FileToReplaces);
EXPECT_TRUE(FileToReplaces.empty());
}