summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-03 15:57:00 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-03 15:57:00 +0000
commitab13857072c2ae35fe1e7ec1defdeaf60babafeb (patch)
treef0bfbbedeab95b02fcbf099522ea7aef2b1cbffc
parent66583c5ff3234a3302a13cfb763b7b4924ef2e24 (diff)
downloadbcm5719-llvm-ab13857072c2ae35fe1e7ec1defdeaf60babafeb.tar.gz
bcm5719-llvm-ab13857072c2ae35fe1e7ec1defdeaf60babafeb.zip
Eliminate header dependency ASTContext -> TargetInfo
llvm-svn: 58613
-rw-r--r--clang/include/clang/AST/ASTContext.h8
-rw-r--r--clang/lib/AST/ASTContext.cpp5
2 files changed, 8 insertions, 5 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h
index 9f3d6906830..4f30e82ec4e 100644
--- a/clang/include/clang/AST/ASTContext.h
+++ b/clang/include/clang/AST/ASTContext.h
@@ -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
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 0e250281a02..1aea5b5c698 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -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;
OpenPOWER on IntegriCloud