]> granicus.if.org Git - clang/commitdiff
Rename Characteristic_t to CharacteristicKind
authorChris Lattner <sabre@nondot.org>
Mon, 27 Oct 2008 01:19:25 +0000 (01:19 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 27 Oct 2008 01:19:25 +0000 (01:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58224 91177308-0d34-0410-b5e6-96231b3b80d8

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

index cd26079f89ec3e28482bd4a314ab178a5c357e34..e559edf4d2e38128645bfc87e653dece79a89fcf 100644 (file)
@@ -36,7 +36,7 @@ class VISIBILITY_HIDDEN DependencyFileCallback : public PPCallbacks {
 
 private:
   bool FileMatchesDepCriteria(const char *Filename,
-                              SrcMgr::Characteristic_t FileType);
+                              SrcMgr::CharacteristicKind FileType);
   void OutputDependencyFile();
 
 public:
@@ -47,7 +47,7 @@ public:
                          const char  *&ErrStr);
   ~DependencyFileCallback();
   virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
-                           SrcMgr::Characteristic_t FileType);
+                           SrcMgr::CharacteristicKind FileType);
 };
 }
 
@@ -148,7 +148,7 @@ bool clang::CreateDependencyFileGen(Preprocessor *PP,
 /// 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 @@ bool DependencyFileCallback::FileMatchesDepCriteria(const char *Filename,
 
 void DependencyFileCallback::FileChanged(SourceLocation Loc,
                                          FileChangeReason Reason,
-                                         SrcMgr::Characteristic_t FileType) {
+                                         SrcMgr::CharacteristicKind FileType) {
   if (Reason != PPCallbacks::EnterFile)
     return;
 
index 570b36b6942fc61d00bb119faf9adfc11d4e5b36..fd150ae3c7086711e088b21eda03beb13d6004de 100644 (file)
@@ -48,7 +48,7 @@ public:
 private:
   unsigned CurLine;
   bool EmittedTokensOnThisLine;
-  SrcMgr::Characteristic_t FileType;
+  SrcMgr::CharacteristicKind FileType;
   llvm::SmallString<512> CurFilename;
   bool Initialized;
 public:
@@ -65,7 +65,7 @@ public:
   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 @@ bool PrintPPOutputPPCallbacks::MoveToLine(SourceLocation Loc) {
 /// 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();
index 407f193e31ba6df40ef04375601b43550ca12b04..be3483ea9504887b5902cbbfea97a0eec02f4c48 100644 (file)
                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 */; };
                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>"; };
                                DE3985780CB8ADC800223765 /* ASTConsumers.h */,
                                DE39857A0CB8ADCB00223765 /* ASTConsumers.cpp */,
                                35A057E60EAE2DDD0069249F /* CacheTokens.cpp */,
+                               DE3B92800EB54E6000D01046 /* DependencyFile.cpp */,
                                DE38CF150D8C9DE000A273B6 /* DiagChecker.cpp */,
                                72D16C210D9975EA00E6DA4A /* HTMLPrint.cpp */,
                                DE5932CF0AD60FF400BC794C /* PrintParserCallbacks.cpp */,
                DED7D78C0A5242E6003AD0FB /* Lex */ = {
                        isa = PBXGroup;
                        children = (
-                               3552E7540E520D80003A8CA5 /* PPCaching.cpp */,
                                DE704DD10D1668A4009C7762 /* HeaderMap.cpp */,
                                DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */,
                                DED7D79E0A5242E6003AD0FB /* Lexer.cpp */,
                                DE85CD9E0D8382DD0070E26E /* MacroArgs.h */,
                                DE85CDA20D8383B20070E26E /* MacroArgs.cpp */,
                                DED7D7A00A5242E6003AD0FB /* MacroInfo.cpp */,
+                               3552E7540E520D80003A8CA5 /* PPCaching.cpp */,
                                DE85CDAF0D838C390070E26E /* PPDirectives.cpp */,
                                DED7D7A20A5242E6003AD0FB /* PPExpressions.cpp */,
                                DE85CDB50D839BAE0070E26E /* PPLexerChange.cpp */,
                                35585DC30EAFBC5F00D0A97A /* Backend.cpp in Sources */,
                                3557D1A90EB136B100C59739 /* InheritViz.cpp in Sources */,
                                3557D1F00EB13BB700C59739 /* SemaInherit.cpp in Sources */,
+                               DE3B92810EB54E6000D01046 /* DependencyFile.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index b41d708784155778c3c7329733c2a7af0ed830b4..4f58334f2e8152de0c83596d4a0f2723f61a8741 100644 (file)
@@ -36,13 +36,13 @@ class IdentifierTokenInfo;
 /// 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 @@ namespace SrcMgr {
     /// 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 @@ namespace SrcMgr {
     /// 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 @@ namespace SrcMgr {
     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 @@ public:
   /// 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 @@ public:
   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 @@ private:
   ///  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.
index e5171cd7fe8763f91651babc8f132eae7e90d1f8..618de39233db7399ce3c13b34d2a79cf250b83dc 100644 (file)
@@ -45,7 +45,7 @@ private:
   } 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 @@ private:
 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 @@ public:
   
   /// 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 @@ public:
   
   /// 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.
index fc0321b3aa07790700b85b0563ad6560990c1d42..ef860c589e742ad903f5efba300401b65079eb43 100644 (file)
@@ -48,7 +48,7 @@ class HeaderSearch {
     /// 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 @@ public:
   
   /// 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.
index d8bcdeb098226943664e352a1ec7847a329b9261..792c6c41f7cefb7e38a70e2b6d2f456c7158378a 100644 (file)
@@ -38,7 +38,7 @@ public:
   /// #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.
index 1eed0bc14320a82da9b585890e65975f4d016441..b8b72878f525476e7365a8865f74df2498e1211b 100644 (file)
@@ -76,7 +76,7 @@ SourceManager::createMemBufferContentCache(const MemoryBuffer *Buffer) {
 /// 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
index a2fa826d0cbe092094802321d316c8c14217a502..b76c99d55d633b7f84a17a03fd862a60360f8caa 100644 (file)
@@ -43,7 +43,7 @@ void InitHeaderSearch::AddPath(const std::string &Path, IncludeDirGroup Group,
   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)
index 44558e19f97b4398df0930d639223972e11d1952..3d077e1a383b5a4e6716cea77c7637f0bcb39dcc 100644 (file)
@@ -675,7 +675,7 @@ void Preprocessor::HandleIncludeDirective(Token &IncludeTok,
   // 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()));
   
index b7e9132baab7da0a83e28f6fd8b890dee1cbd860..1ba33b58a75b6f3c48d6eb0c5fbe421fe54b068c 100644 (file)
@@ -95,7 +95,7 @@ void Preprocessor::EnterSourceFileWithLexer(Lexer *TheLexer,
   
   // 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 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
 
     // 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),