[cfe-commits] r58224 - in /cfe/trunk: Driver/DependencyFile.cpp Driver/PrintPreprocessedOutput.cpp clang.xcodeproj/project.pbxproj include/clang/Basic/SourceManager.h include/clang/Lex/DirectoryLookup.h include/clang/Lex/HeaderSearch.h include/clang/Lex/PPCallbacks.h lib/Basic/SourceManager.cpp lib/Driver/InitHeaderSearch.cpp lib/Lex/PPDirectives.cpp lib/Lex/PPLexerChange.cpp

Chris Lattner sabre at nondot.org
Sun Oct 26 18:19:25 PDT 2008


Author: lattner
Date: Sun Oct 26 20:19:25 2008
New Revision: 58224

URL: http://llvm.org/viewvc/llvm-project?rev=58224&view=rev
Log:
Rename Characteristic_t to CharacteristicKind


Modified:
    cfe/trunk/Driver/DependencyFile.cpp
    cfe/trunk/Driver/PrintPreprocessedOutput.cpp
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/include/clang/Basic/SourceManager.h
    cfe/trunk/include/clang/Lex/DirectoryLookup.h
    cfe/trunk/include/clang/Lex/HeaderSearch.h
    cfe/trunk/include/clang/Lex/PPCallbacks.h
    cfe/trunk/lib/Basic/SourceManager.cpp
    cfe/trunk/lib/Driver/InitHeaderSearch.cpp
    cfe/trunk/lib/Lex/PPDirectives.cpp
    cfe/trunk/lib/Lex/PPLexerChange.cpp

Modified: cfe/trunk/Driver/DependencyFile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/DependencyFile.cpp?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/Driver/DependencyFile.cpp (original)
+++ cfe/trunk/Driver/DependencyFile.cpp Sun Oct 26 20:19:25 2008
@@ -36,7 +36,7 @@
 
 private:
   bool FileMatchesDepCriteria(const char *Filename,
-                              SrcMgr::Characteristic_t FileType);
+                              SrcMgr::CharacteristicKind FileType);
   void OutputDependencyFile();
 
 public:
@@ -47,7 +47,7 @@
                          const char  *&ErrStr);
   ~DependencyFileCallback();
   virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
-                           SrcMgr::Characteristic_t FileType);
+                           SrcMgr::CharacteristicKind FileType);
 };
 }
 
@@ -148,7 +148,7 @@
 /// FileMatchesDepCriteria - Determine whether the given Filename should be
 /// considered as a dependency.
 bool DependencyFileCallback::FileMatchesDepCriteria(const char *Filename,
-                                            SrcMgr::Characteristic_t FileType) {
+                                          SrcMgr::CharacteristicKind FileType) {
   if (strcmp(InputFile.c_str(), Filename) != 0 &&
       strcmp("<predefines>", Filename) != 0) {
       if (GenerateDependencyFileNoSysHeaders)
@@ -162,7 +162,7 @@
 
 void DependencyFileCallback::FileChanged(SourceLocation Loc,
                                          FileChangeReason Reason,
-                                         SrcMgr::Characteristic_t FileType) {
+                                         SrcMgr::CharacteristicKind FileType) {
   if (Reason != PPCallbacks::EnterFile)
     return;
 

Modified: cfe/trunk/Driver/PrintPreprocessedOutput.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintPreprocessedOutput.cpp?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/Driver/PrintPreprocessedOutput.cpp (original)
+++ cfe/trunk/Driver/PrintPreprocessedOutput.cpp Sun Oct 26 20:19:25 2008
@@ -48,7 +48,7 @@
 private:
   unsigned CurLine;
   bool EmittedTokensOnThisLine;
-  SrcMgr::Characteristic_t FileType;
+  SrcMgr::CharacteristicKind FileType;
   llvm::SmallString<512> CurFilename;
   bool Initialized;
 public:
@@ -65,7 +65,7 @@
   bool hasEmittedTokensOnThisLine() const { return EmittedTokensOnThisLine; }
   
   virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
-                           SrcMgr::Characteristic_t FileType);
+                           SrcMgr::CharacteristicKind FileType);
   virtual void Ident(SourceLocation Loc, const std::string &str);
   
 
@@ -143,7 +143,7 @@
 /// position.
 void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc,
                                            FileChangeReason Reason,
-                                         SrcMgr::Characteristic_t NewFileType) {
+                                       SrcMgr::CharacteristicKind NewFileType) {
   // Unless we are exiting a #include, make sure to skip ahead to the line the
   // #include directive was at.
   SourceManager &SourceMgr = PP.getSourceManager();

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Sun Oct 26 20:19:25 2008
@@ -116,6 +116,7 @@
 		DE39857B0CB8ADCB00223765 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE39857A0CB8ADCB00223765 /* ASTConsumers.cpp */; };
 		DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3986EF0CB8D4B300223765 /* IdentifierTable.h */; };
 		DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */; };
+		DE3B92810EB54E6000D01046 /* DependencyFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3B92800EB54E6000D01046 /* DependencyFile.cpp */; };
 		DE4121350D7F1C1C0080F80A /* SymbolManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121270D7F1C1C0080F80A /* SymbolManager.cpp */; };
 		DE4121360D7F1C1C0080F80A /* ExplodedGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121280D7F1C1C0080F80A /* ExplodedGraph.cpp */; };
 		DE4121370D7F1C1C0080F80A /* UninitializedValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4121290D7F1C1C0080F80A /* UninitializedValues.cpp */; };
@@ -442,6 +443,7 @@
 		DE3B90DE0EAC5EF200D01046 /* ExtensionRAIIObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExtensionRAIIObject.h; path = lib/Parse/ExtensionRAIIObject.h; sourceTree = "<group>"; };
 		DE3B921C0EB1A81400D01046 /* SemaInherit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemaInherit.h; path = lib/Sema/SemaInherit.h; sourceTree = "<group>"; };
 		DE3B92230EB5152000D01046 /* Designator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Designator.h; path = clang/Parse/Designator.h; sourceTree = "<group>"; };
+		DE3B92800EB54E6000D01046 /* DependencyFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DependencyFile.cpp; path = Driver/DependencyFile.cpp; sourceTree = "<group>"; };
 		DE41211D0D7F1BBE0080F80A /* GRWorkList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRWorkList.h; path = clang/Analysis/PathSensitive/GRWorkList.h; sourceTree = "<group>"; };
 		DE41211E0D7F1BBE0080F80A /* SymbolManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolManager.h; path = clang/Analysis/PathSensitive/SymbolManager.h; sourceTree = "<group>"; };
 		DE41211F0D7F1BBE0080F80A /* GRBlockCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GRBlockCounter.h; path = clang/Analysis/PathSensitive/GRBlockCounter.h; sourceTree = "<group>"; };
@@ -908,6 +910,7 @@
 				DE3985780CB8ADC800223765 /* ASTConsumers.h */,
 				DE39857A0CB8ADCB00223765 /* ASTConsumers.cpp */,
 				35A057E60EAE2DDD0069249F /* CacheTokens.cpp */,
+				DE3B92800EB54E6000D01046 /* DependencyFile.cpp */,
 				DE38CF150D8C9DE000A273B6 /* DiagChecker.cpp */,
 				72D16C210D9975EA00E6DA4A /* HTMLPrint.cpp */,
 				DE5932CF0AD60FF400BC794C /* PrintParserCallbacks.cpp */,
@@ -1063,7 +1066,6 @@
 		DED7D78C0A5242E6003AD0FB /* Lex */ = {
 			isa = PBXGroup;
 			children = (
-				3552E7540E520D80003A8CA5 /* PPCaching.cpp */,
 				DE704DD10D1668A4009C7762 /* HeaderMap.cpp */,
 				DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */,
 				DED7D79E0A5242E6003AD0FB /* Lexer.cpp */,
@@ -1071,6 +1073,7 @@
 				DE85CD9E0D8382DD0070E26E /* MacroArgs.h */,
 				DE85CDA20D8383B20070E26E /* MacroArgs.cpp */,
 				DED7D7A00A5242E6003AD0FB /* MacroInfo.cpp */,
+				3552E7540E520D80003A8CA5 /* PPCaching.cpp */,
 				DE85CDAF0D838C390070E26E /* PPDirectives.cpp */,
 				DED7D7A20A5242E6003AD0FB /* PPExpressions.cpp */,
 				DE85CDB50D839BAE0070E26E /* PPLexerChange.cpp */,
@@ -1297,6 +1300,7 @@
 				35585DC30EAFBC5F00D0A97A /* Backend.cpp in Sources */,
 				3557D1A90EB136B100C59739 /* InheritViz.cpp in Sources */,
 				3557D1F00EB13BB700C59739 /* SemaInherit.cpp in Sources */,
+				DE3B92810EB54E6000D01046 /* DependencyFile.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Sun Oct 26 20:19:25 2008
@@ -36,13 +36,13 @@
 /// SourceManager implementation.
 ///
 namespace SrcMgr {
-  /// Characteristic_t - This is used to represent whether a file or directory
+  /// CharacteristicKind - This is used to represent whether a file or directory
   /// holds normal user code, system code, or system code which is implicitly
   /// 'extern "C"' in C++ mode.  Entire directories can be tagged with this
   /// (this is maintained by DirectoryLookup and friends) as can specific
   /// FileIDInfos when a #pragma system_header is seen or various other cases.
   ///
-  enum Characteristic_t {
+  enum CharacteristicKind {
     C_User, C_System, C_ExternCSystem
   };
   
@@ -125,7 +125,7 @@
     /// chunk number of this FileID.
     unsigned ChunkNo : 30;
     
-    /// FileCharacteristic - This is an instance of Characteristic_t,
+    /// FileCharacteristic - This is an instance of CharacteristicKind,
     /// indicating whether this is a system header dir or not.
     unsigned FileCharacteristic : 2;
     
@@ -136,7 +136,7 @@
     /// get - Return a FileIDInfo object.
     static FileIDInfo get(SourceLocation IL, unsigned CN, 
                           const ContentCache *Con,
-                          Characteristic_t FileCharacter) {
+                          CharacteristicKind FileCharacter) {
       FileIDInfo X;
       X.IncludeLoc = IL;
       X.ChunkNo = CN;
@@ -150,8 +150,8 @@
     const ContentCache* getContentCache() const { return Content; }
 
     /// getCharacteristic - Return whether this is a system header or not.
-    Characteristic_t getFileCharacteristic() const { 
-      return (Characteristic_t)FileCharacteristic;
+    CharacteristicKind getFileCharacteristic() const { 
+      return (CharacteristicKind)FileCharacteristic;
     }
     
     /// Emit - Emit this FileIDInfo to Bitcode.
@@ -267,7 +267,7 @@
   /// being #included from the specified IncludePosition.  This returns 0 on
   /// error and translates NULL into standard input.
   unsigned createFileID(const FileEntry *SourceFile, SourceLocation IncludePos,
-                        SrcMgr::Characteristic_t FileCharacter) {
+                        SrcMgr::CharacteristicKind FileCharacter) {
     const SrcMgr::ContentCache *IR = getContentCache(SourceFile);
     if (IR == 0) return 0;    // Error opening file?
     return createFileID(IR, IncludePos, FileCharacter);
@@ -450,7 +450,7 @@
   bool isInSystemHeader(SourceLocation Loc) const {
     return getFileCharacteristic(Loc) != SrcMgr::C_User;
   }
-  SrcMgr::Characteristic_t getFileCharacteristic(SourceLocation Loc) const {
+  SrcMgr::CharacteristicKind getFileCharacteristic(SourceLocation Loc) const {
     return getFIDInfo(getPhysicalLoc(Loc).getFileID())->getFileCharacteristic();
   }
 
@@ -498,7 +498,7 @@
   ///  corresponds to a file or some other input source.
   unsigned createFileID(const SrcMgr::ContentCache* File,
                         SourceLocation IncludePos,
-                        SrcMgr::Characteristic_t DirCharacter);
+                        SrcMgr::CharacteristicKind DirCharacter);
     
   /// getContentCache - Create or return a cached ContentCache for the specified
   ///  file.  This returns null on failure.

Modified: cfe/trunk/include/clang/Lex/DirectoryLookup.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/DirectoryLookup.h?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/include/clang/Lex/DirectoryLookup.h (original)
+++ cfe/trunk/include/clang/Lex/DirectoryLookup.h Sun Oct 26 20:19:25 2008
@@ -45,7 +45,7 @@
   } u;
   
   /// DirCharacteristic - The type of directory this is: this is an instance of
-  /// SrcMgr::Characteristic_t.
+  /// SrcMgr::CharacteristicKind.
   unsigned DirCharacteristic : 2;
   
   /// UserSupplied - True if this is a user-supplied directory.
@@ -58,7 +58,7 @@
 public:
   /// DirectoryLookup ctor - Note that this ctor *does not take ownership* of
   /// 'dir'.
-  DirectoryLookup(const DirectoryEntry *dir, SrcMgr::Characteristic_t DT,
+  DirectoryLookup(const DirectoryEntry *dir, SrcMgr::CharacteristicKind DT,
                   bool isUser, bool isFramework)
     : DirCharacteristic(DT), UserSupplied(isUser),
      LookupType(isFramework ? LT_Framework : LT_NormalDir) {
@@ -67,7 +67,7 @@
   
   /// DirectoryLookup ctor - Note that this ctor *does not take ownership* of
   /// 'map'.
-  DirectoryLookup(const HeaderMap *map, SrcMgr::Characteristic_t DT,
+  DirectoryLookup(const HeaderMap *map, SrcMgr::CharacteristicKind DT,
                   bool isUser)
     : DirCharacteristic(DT), UserSupplied(isUser), LookupType(LT_HeaderMap) {
     u.Map = map; 
@@ -107,8 +107,8 @@
   
   /// DirCharacteristic - The type of directory this is, one of the DirType enum
   /// values.
-  SrcMgr::Characteristic_t getDirCharacteristic() const {
-    return (SrcMgr::Characteristic_t)DirCharacteristic;
+  SrcMgr::CharacteristicKind getDirCharacteristic() const {
+    return (SrcMgr::CharacteristicKind)DirCharacteristic;
   }
   
   /// isUserSupplied - True if this is a user-supplied directory.

Modified: cfe/trunk/include/clang/Lex/HeaderSearch.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/HeaderSearch.h?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/include/clang/Lex/HeaderSearch.h (original)
+++ cfe/trunk/include/clang/Lex/HeaderSearch.h Sun Oct 26 20:19:25 2008
@@ -48,7 +48,7 @@
     /// DirInfo - Keep track of whether this is a system header, and if so,
     /// whether it is C++ clean or not.  This can be set by the include paths or
     /// by #pragma gcc system_header.  This is an instance of
-    /// SrcMgr::Characteristic_t.
+    /// SrcMgr::CharacteristicKind.
     unsigned DirInfo : 2;
     
     /// NumIncludes - This is the number of times the file has been included
@@ -155,8 +155,8 @@
   
   /// getFileDirFlavor - Return whether the specified file is a normal header,
   /// a system header, or a C++ friendly system header.
-  SrcMgr::Characteristic_t getFileDirFlavor(const FileEntry *File) {
-    return (SrcMgr::Characteristic_t)getFileInfo(File).DirInfo;
+  SrcMgr::CharacteristicKind getFileDirFlavor(const FileEntry *File) {
+    return (SrcMgr::CharacteristicKind)getFileInfo(File).DirInfo;
   }
     
   /// MarkFileIncludeOnce - Mark the specified file as a "once only" file, e.g.

Modified: cfe/trunk/include/clang/Lex/PPCallbacks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PPCallbacks.h?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/include/clang/Lex/PPCallbacks.h (original)
+++ cfe/trunk/include/clang/Lex/PPCallbacks.h Sun Oct 26 20:19:25 2008
@@ -38,7 +38,7 @@
   /// #include'd file (when true) or whether we're exiting one because we ran
   /// off the end (when false).
   virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
-                           SrcMgr::Characteristic_t FileType) {
+                           SrcMgr::CharacteristicKind FileType) {
   }
   
   /// Ident - This callback is invoked when a #ident or #sccs directive is read.

Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Sun Oct 26 20:19:25 2008
@@ -76,7 +76,7 @@
 /// corresponds to a file or some other input source.
 unsigned SourceManager::createFileID(const ContentCache *File,
                                      SourceLocation IncludePos,
-                                     SrcMgr::Characteristic_t FileCharacter) {
+                                     SrcMgr::CharacteristicKind FileCharacter) {
   // If FileEnt is really large (e.g. it's a large .i file), we may not be able
   // to fit an arbitrary position in the file in the FilePos field.  To handle
   // this, we create one FileID for each chunk of the file that fits in a

Modified: cfe/trunk/lib/Driver/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/InitHeaderSearch.cpp?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Driver/InitHeaderSearch.cpp Sun Oct 26 20:19:25 2008
@@ -43,7 +43,7 @@
   MappedPath.append(Path.begin(), Path.end());
 
   // Compute the DirectoryLookup type.
-  SrcMgr::Characteristic_t Type;
+  SrcMgr::CharacteristicKind Type;
   if (Group == Quoted || Group == Angled)
     Type = SrcMgr::C_User;
   else if (isCXXAware)

Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Sun Oct 26 20:19:25 2008
@@ -675,7 +675,7 @@
   // The #included file will be considered to be a system header if either it is
   // in a system include directory, or if the #includer is a system include
   // header.
-  SrcMgr::Characteristic_t FileCharacter = 
+  SrcMgr::CharacteristicKind FileCharacter = 
     std::max(HeaderInfo.getFileDirFlavor(File),
           SourceMgr.getFileCharacteristic(getCurrentFileLexer()->getFileLoc()));
   

Modified: cfe/trunk/lib/Lex/PPLexerChange.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPLexerChange.cpp?rev=58224&r1=58223&r2=58224&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PPLexerChange.cpp (original)
+++ cfe/trunk/lib/Lex/PPLexerChange.cpp Sun Oct 26 20:19:25 2008
@@ -95,7 +95,7 @@
   
   // Notify the client, if desired, that we are in a new source file.
   if (Callbacks && !CurLexer->Is_PragmaLexer) {
-    SrcMgr::Characteristic_t FileType =
+    SrcMgr::CharacteristicKind FileType =
        SourceMgr.getFileCharacteristic(CurLexer->getFileLoc());
     
     Callbacks->FileChanged(CurLexer->getFileLoc(),
@@ -178,7 +178,7 @@
 
     // Notify the client, if desired, that we are in a new source file.
     if (Callbacks && !isEndOfMacro && CurLexer) {
-      SrcMgr::Characteristic_t FileType =
+      SrcMgr::CharacteristicKind FileType =
         SourceMgr.getFileCharacteristic(CurLexer->getFileLoc());
       
       Callbacks->FileChanged(CurLexer->getSourceLocation(CurLexer->BufferPtr),





More information about the cfe-commits mailing list