]> granicus.if.org Git - clang/commitdiff
Eliminate header dependency ASTContext -> TargetInfo
authorDouglas Gregor <dgregor@apple.com>
Mon, 3 Nov 2008 15:57:00 +0000 (15:57 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 3 Nov 2008 15:57:00 +0000 (15:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58613 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp

index 9f3d69068305149d82a9fab32d66d15be9fda41d..4f30e82ec4e4c51b5491663fc32ec0c07715ea30 100644 (file)
@@ -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 @@ namespace clang {
   class IdentifierTable;
   class SelectorTable;
   class SourceManager;
+  class TargetInfo;
   // Decls
   class Decl;
   class ObjCPropertyDecl;
@@ -319,12 +319,14 @@ public:
   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
index 0e250281a024304fd2556c49750392c21beb2570..1aea5b5c69860949ec4aebfe61b8414430fc69b5 100644 (file)
@@ -1793,8 +1793,9 @@ void ASTContext::setObjCConstantStringInterface(ObjCInterfaceDecl *Decl) {
 }
 
 /// 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;