[cfe-commits] r120255 - /cfe/trunk/include/clang/Basic/FileManager.h
Chris Lattner
sabre at nondot.org
Sun Nov 28 10:44:10 PST 2010
Author: lattner
Date: Sun Nov 28 12:44:10 2010
New Revision: 120255
URL: http://llvm.org/viewvc/llvm-project?rev=120255&view=rev
Log:
tighten up operator= to ensure we don't get multiple owners with the same FD.
wouldn't move ctors be nice? :)
Modified:
cfe/trunk/include/clang/Basic/FileManager.h
Modified: cfe/trunk/include/clang/Basic/FileManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/FileManager.h?rev=120255&r1=120254&r2=120255&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/FileManager.h (original)
+++ cfe/trunk/include/clang/Basic/FileManager.h Sun Nov 28 12:44:10 2010
@@ -72,7 +72,12 @@
FileEntry(const FileEntry &FE) {
memcpy(this, &FE, sizeof(FE));
- assert(FD == -1 && "Cannot copy an file-owning FileEntry");
+ assert(FD == -1 && "Cannot copy a file-owning FileEntry");
+ }
+
+ void operator=(const FileEntry &FE) {
+ memcpy(this, &FE, sizeof(FE));
+ assert(FD == -1 && "Cannot assign a file-owning FileEntry");
}
~FileEntry();
More information about the cfe-commits
mailing list