[cfe-commits] r58613 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp

Douglas Gregor doug.gregor at gmail.com
Mon Nov 3 07:57:00 PST 2008


Author: dgregor
Date: Mon Nov  3 09:57:00 2008
New Revision: 58613

URL: http://llvm.org/viewvc/llvm-project?rev=58613&view=rev
Log:
Eliminate header dependency ASTContext -> TargetInfo

Modified:
    cfe/trunk/include/clang/AST/ASTContext.h
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/include/clang/AST/ASTContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=58613&r1=58612&r2=58613&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/ASTContext.h (original)
+++ cfe/trunk/include/clang/AST/ASTContext.h Mon Nov  3 09:57:00 2008
@@ -15,7 +15,6 @@
 #define LLVM_CLANG_AST_ASTCONTEXT_H
 
 #include "clang/Basic/LangOptions.h"
-#include "clang/Basic/TargetInfo.h"
 #include "clang/AST/Builtins.h"
 #include "clang/AST/DeclBase.h"
 #include "clang/AST/Type.h"
@@ -36,6 +35,7 @@
   class IdentifierTable;
   class SelectorTable;
   class SourceManager;
+  class TargetInfo;
   // Decls
   class Decl;
   class ObjCPropertyDecl;
@@ -319,12 +319,14 @@
   void setBuiltinVaListType(QualType T);
   QualType getBuiltinVaListType() const { return BuiltinVaListType; }
     
-  QualType getFromTargetType(TargetInfo::IntType Type) const;
+private:
+  QualType getFromTargetType(unsigned Type) const;
 
   //===--------------------------------------------------------------------===//
   //                         Type Predicates.
   //===--------------------------------------------------------------------===//
-  
+ 
+public:
   /// isObjCObjectPointerType - Returns true if type is an Objective-C pointer
   /// to an object type.  This includes "id" and "Class" (two 'special' pointers
   /// to struct), Interface* (pointer to ObjCInterfaceType) and id<P> (qualified

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=58613&r1=58612&r2=58613&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Nov  3 09:57:00 2008
@@ -1793,8 +1793,9 @@
 }
 
 /// getFromTargetType - Given one of the integer types provided by
-/// TargetInfo, produce the corresponding type.
-QualType ASTContext::getFromTargetType(TargetInfo::IntType Type) const {
+/// TargetInfo, produce the corresponding type. The unsigned @p Type
+/// is actually a value of type @c TargetInfo::IntType.
+QualType ASTContext::getFromTargetType(unsigned Type) const {
   switch (Type) {
   case TargetInfo::NoInt: return QualType(); 
   case TargetInfo::SignedShort: return ShortTy;





More information about the cfe-commits mailing list