[cfe-commits] r39163 - in /cfe/cfe/trunk/include/clang/AST: AST.h Type.h

sabre at cs.uiuc.edu sabre at cs.uiuc.edu
Wed Jul 11 09:40:17 PDT 2007


Author: sabre
Date: Wed Jul 11 11:40:17 2007
New Revision: 39163

URL: http://llvm.org/viewvc/llvm-project?rev=39163&view=rev
Log:
Tweak Type.h to compile.

Modified:
    cfe/cfe/trunk/include/clang/AST/AST.h
    cfe/cfe/trunk/include/clang/AST/Type.h

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

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/AST.h (original)
+++ cfe/cfe/trunk/include/clang/AST/AST.h Wed Jul 11 11:40:17 2007
@@ -19,6 +19,7 @@
 #include "clang/AST/ASTStreamer.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/Expr.h"
+#include "clang/AST/Type.h"
 #include "clang/AST/StmtVisitor.h"
 
 #endif

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

==============================================================================
--- cfe/cfe/trunk/include/clang/AST/Type.h (original)
+++ cfe/cfe/trunk/include/clang/AST/Type.h Wed Jul 11 11:40:17 2007
@@ -14,6 +14,9 @@
 #ifndef LLVM_CLANG_PARSE_TYPE_H
 #define LLVM_CLANG_PARSE_TYPE_H
 
+#include "llvm/Support/DataTypes.h"
+#include <cassert>
+
 namespace llvm {
 namespace clang {
   class TypeDecl;
@@ -41,17 +44,17 @@
   
   TypeRef(Type *Ptr, unsigned Quals) {
     assert((Quals & ~CVRFlags) == 0 && "Invalid type qualifiers!");
-    ThePtr = static_cast<uintptr_t>(Ptr);
+    ThePtr = reinterpret_cast<uintptr_t>(Ptr);
     assert((ThePtr & CVRFlags) == 0 && "Type pointer not 8-byte aligned?");
     ThePtr |= Quals;
   }
   
   Type &operator*() const {
-    return *static_cast<Type*>(ThePtr & ~CVRFlags);
+    return *reinterpret_cast<Type*>(ThePtr & ~CVRFlags);
   }
 
   Type *operator->() const {
-    return static_cast<Type*>(ThePtr & ~CVRFlags);
+    return reinterpret_cast<Type*>(ThePtr & ~CVRFlags);
   }
 
   bool isConstQualified() const {
@@ -101,13 +104,13 @@
   Type *getCanonicalType() const { return CanonicalType; }
 };
 
-class PointerType : public CType {
+class PointerType : public Type {
   TypeRef PointeeType;
 public:
   
 };
 
-class TypedefType : public CType {
+class TypedefType : public Type {
   // Decl * here.
 public:
   





More information about the cfe-commits mailing list