]> granicus.if.org Git - clang/commitdiff
[clang] Remove FileEntry copy-constructor
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Thu, 20 Oct 2016 21:20:35 +0000 (21:20 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Thu, 20 Oct 2016 21:20:35 +0000 (21:20 +0000)
Code cleanup: address FIXME in the file
include/clang/Basic/FileManager.h and remove
copy-constructor of the class FileEntry.

Test plan: make check-clang

Differential revision: https://reviews.llvm.org/D22712

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284782 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/FileManager.h

index 8539e8ee9ec50fd56880f2ee97df958db68f0b41..7bee4c596823e2644347d7b884794ecaadaad5a2 100644 (file)
@@ -65,6 +65,7 @@ class FileEntry {
   mutable std::unique_ptr<vfs::File> File;
   friend class FileManager;
 
+  FileEntry(const FileEntry &) = delete;
   void operator=(const FileEntry &) = delete;
 
 public:
@@ -72,15 +73,6 @@ public:
       : UniqueID(0, 0), IsNamedPipe(false), InPCH(false), IsValid(false)
   {}
 
-  // FIXME: this is here to allow putting FileEntry in std::map.  Once we have
-  // emplace, we shouldn't need a copy constructor anymore.
-  /// Intentionally does not copy fields that are not set in an uninitialized
-  /// \c FileEntry.
-  FileEntry(const FileEntry &FE) : UniqueID(FE.UniqueID),
-      IsNamedPipe(FE.IsNamedPipe), InPCH(FE.InPCH), IsValid(FE.IsValid) {
-    assert(!isValid() && "Cannot copy an initialized FileEntry");
-  }
-
   StringRef getName() const { return Name; }
   StringRef tryGetRealPathName() const { return RealPathName; }
   bool isValid() const { return IsValid; }