[PATCH] D22712: Remove FileEntry copy-constructor
Alexander Shaposhnikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 22 17:52:34 PDT 2016
alexshap created this revision.
alexshap added reviewers: bkramer, jdennett.
alexshap added subscribers: compnerd, cfe-commits.
alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users".
Code cleanup: address FIXME in llvm/tools/clang/include/clang/Basic/FileManager.h.
Remove FileEntry copy-constructor. Build of llvm, clang succeeded, make check-all succeeded.
https://reviews.llvm.org/D22712
Files:
include/clang/Basic/FileManager.h
Index: include/clang/Basic/FileManager.h
===================================================================
--- include/clang/Basic/FileManager.h
+++ include/clang/Basic/FileManager.h
@@ -66,6 +66,7 @@
mutable std::unique_ptr<vfs::File> File;
friend class FileManager;
+ FileEntry(const FileEntry &) = delete;
void operator=(const FileEntry &) = delete;
public:
@@ -73,15 +74,6 @@
: 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");
- }
-
const char *getName() const { return Name; }
StringRef tryGetRealPathName() const { return RealPathName; }
bool isValid() const { return IsValid; }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22712.65187.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160723/2a3e1ccb/attachment.bin>
More information about the cfe-commits
mailing list