[PATCH] D156598: Support: Delete copy constructors for RedirectingFileSystem

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 29 07:19:37 PDT 2023


tstellar created this revision.
Herald added a project: All.
tstellar requested review of this revision.
Herald added a subscriber: bd1976llvm.
Herald added a project: LLVM.

This is necessary to avoid C2280 errors with msvc if we were to add
__declspec(dllexport) to the class.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156598

Files:
  llvm/include/llvm/Support/VirtualFileSystem.h


Index: llvm/include/llvm/Support/VirtualFileSystem.h
===================================================================
--- llvm/include/llvm/Support/VirtualFileSystem.h
+++ llvm/include/llvm/Support/VirtualFileSystem.h
@@ -987,6 +987,11 @@
 
   RedirectingFileSystem(IntrusiveRefCntPtr<FileSystem> ExternalFS);
 
+  /// Explicitly delete copy constructors.  The unique_ptrs in \c Roots can't
+  /// be copied.
+  RedirectingFileSystem(const RedirectingFileSystem &) = delete;
+  RedirectingFileSystem &operator=(const RedirectingFileSystem &) = delete;
+
   /// Looks up the path <tt>[Start, End)</tt> in \p From, possibly recursing
   /// into the contents of \p From if it is a directory. Returns a LookupResult
   /// giving the matched entry and, if that entry is a FileEntry or


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156598.545373.patch
Type: text/x-patch
Size: 785 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230729/137491f6/attachment.bin>


More information about the llvm-commits mailing list