[cfe-commits] r46654 - in /cfe/trunk/include/clang: Basic/SourceManager.h Lex/HeaderSearch.h
Steve Naroff
snaroff at apple.com
Fri Feb 1 16:10:46 PST 2008
Author: snaroff
Date: Fri Feb 1 18:10:46 2008
New Revision: 46654
URL: http://llvm.org/viewvc/llvm-project?rev=46654&view=rev
Log:
Cleanup previous patch (based on feedback from Ted).
Since this behavior is useful for most classes, we might consider adding a simple 3 method class that implements the behavior. Ted said that Boost has such a class.
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
cfe/trunk/include/clang/Lex/HeaderSearch.h
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=46654&r1=46653&r2=46654&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Fri Feb 1 18:10:46 2008
@@ -222,14 +222,14 @@
/// MainFileID - The file ID for the main source file of the translation unit.
unsigned MainFileID;
-
+
+ // SourceManager doesn't support copy construction.
+ explicit SourceManager(const SourceManager&);
+ void operator=(const SourceManager&);
public:
SourceManager() : LastLineNoFileIDQuery(~0U), MainFileID(0) {}
~SourceManager() {}
- // SourceManager doesn't support copy construction.
- explicit SourceManager(const SourceManager&);
-
void clearIDTables() {
FileIDs.clear();
MacroIDs.clear();
Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=46654&r1=46653&r2=46654&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
+++ cfe/trunk/include/clang/Lex/HeaderSearch.h Fri Feb 1 18:10:46 2008
@@ -89,13 +89,15 @@
unsigned NumIncluded;
unsigned NumMultiIncludeFileOptzn;
unsigned NumFrameworkLookups, NumSubFrameworkLookups;
+
+ // HeaderSearch doesn't support default or copy construction.
+ explicit HeaderSearch();
+ explicit HeaderSearch(const HeaderSearch&);
+ void operator=(const HeaderSearch&);
public:
HeaderSearch(FileManager &FM);
~HeaderSearch();
- // HeaderSearch doesn't support copy construction.
- explicit HeaderSearch(const HeaderSearch&);
-
FileManager &getFileMgr() const { return FileMgr; }
/// SetSearchPaths - Interface for setting the file search paths.
More information about the cfe-commits
mailing list