aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/ASTContext.h17
-rw-r--r--include/clang/AST/Decl.h138
-rw-r--r--include/clang/AST/DeclBase.h18
-rw-r--r--include/clang/AST/DeclCXX.h65
-rw-r--r--include/clang/AST/DeclGroup.h13
-rw-r--r--include/clang/AST/DeclTemplate.h29
-rw-r--r--include/clang/AST/DeclarationName.h1
-rw-r--r--include/clang/AST/Expr.h101
-rw-r--r--include/clang/AST/ExprCXX.h59
-rw-r--r--include/clang/AST/ExprObjC.h28
-rw-r--r--include/clang/AST/Stmt.h86
-rw-r--r--include/clang/AST/Type.h132
-rw-r--r--include/clang/Basic/FileManager.h1
-rw-r--r--include/clang/Basic/IdentifierTable.h33
-rw-r--r--include/clang/Basic/LangOptions.h8
-rw-r--r--include/clang/Basic/SourceLocation.h13
-rw-r--r--include/clang/Basic/SourceManager.h18
-rw-r--r--lib/AST/ASTContext.cpp178
-rw-r--r--lib/AST/CMakeLists.txt3
-rw-r--r--lib/AST/DeclGroup.cpp37
-rw-r--r--lib/AST/DeclSerialization.cpp695
-rw-r--r--lib/AST/DeclarationName.cpp3
-rw-r--r--lib/AST/StmtSerialization.cpp1602
-rw-r--r--lib/AST/TypeSerialization.cpp490
-rw-r--r--lib/Basic/CMakeLists.txt1
-rw-r--r--lib/Basic/FileManager.cpp2
-rw-r--r--lib/Basic/IdentifierTable.cpp159
-rw-r--r--lib/Basic/LangOptions.cpp60
-rw-r--r--lib/Basic/SourceLocation.cpp22
-rw-r--r--lib/Basic/SourceManager.cpp134
-rw-r--r--tools/clang-cc/ASTConsumers.cpp141
-rw-r--r--tools/clang-cc/ASTConsumers.h7
-rw-r--r--tools/clang-cc/CMakeLists.txt1
-rw-r--r--tools/clang-cc/SerializationTest.cpp226
-rw-r--r--tools/clang-cc/clang-cc.cpp82
35 files changed, 8 insertions, 4595 deletions
diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h
index bba9cfb400..f49b56c62f 100644
--- a/include/clang/AST/ASTContext.h
+++ b/include/clang/AST/ASTContext.h
@@ -25,7 +25,6 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/OwningPtr.h"
-#include "llvm/Bitcode/SerializationFwd.h"
#include "llvm/Support/Allocator.h"
#include <vector>
@@ -167,11 +166,6 @@ public:
TranslationUnitDecl *getTranslationUnitDecl() const { return TUDecl; }
- /// This is intentionally not serialized. It is populated by the
- /// ASTContext ctor, and there are no external pointers/references to
- /// internal variables of BuiltinInfo.
- // FIXME: PCH does serialize this information, so that we don't have to
- // construct it again when the PCH is loaded.
Builtin::Context BuiltinInfo;
// Builtin Types.
@@ -700,17 +694,6 @@ public:
const_type_iterator types_end() const { return Types.end(); }
//===--------------------------------------------------------------------===//
- // Serialization
- //===--------------------------------------------------------------------===//
-
- void EmitASTBitcodeBuffer(std::vector<unsigned char> &Buffer) const;
- static ASTContext *ReadASTBitcodeBuffer(llvm::MemoryBuffer &MBuffer,
- FileManager &FMgr);
-
- void Emit(llvm::Serializer& S) const;
- static ASTContext *Create(llvm::Deserializer& D);
-
- //===--------------------------------------------------------------------===//
// Integer Values
//===--------------------------------------------------------------------===//
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 29112b9045..a573c48af3 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -25,10 +25,6 @@ class CompoundStmt;
class StringLiteral;
/// TranslationUnitDecl - The top declaration context.
-/// FIXME: The TranslationUnit class should probably be modified to serve as
-/// the top decl context. It would have ownership of the top decls so that the
-/// AST is self-contained and easily de/serializable.
-/// FIXME: TranslationUnitDecl isn't really a Decl (!)
class TranslationUnitDecl : public Decl, public DeclContext {
TranslationUnitDecl()
: Decl(TranslationUnit, 0, SourceLocation()),
@@ -44,15 +40,6 @@ public:
static TranslationUnitDecl *castFromDeclContext(const DeclContext *DC) {
return static_cast<TranslationUnitDecl *>(const_cast<DeclContext*>(DC));
}
-
-protected:
- /// EmitImpl - Serialize this TranslationUnitDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a TranslationUnitDecl. Called by Decl::Create.
- static TranslationUnitDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// NamedDecl - This represents a decl with a name. Many decls have names such
@@ -120,10 +107,6 @@ public:
return D->getKind() >= NamedFirst && D->getKind() <= NamedLast;
}
static bool classof(const NamedDecl *D) { return true; }
-
-protected:
- void EmitInRec(llvm::Serializer& S) const;
- void ReadInRec(llvm::Deserializer& D, ASTContext& C);
};
/// NamespaceDecl - Represent a C++ namespace.
@@ -179,15 +162,6 @@ public:
static NamespaceDecl *castFromDeclContext(const DeclContext *DC) {
return static_cast<NamespaceDecl *>(const_cast<DeclContext*>(DC));
}
-
-protected:
- /// EmitImpl - Serialize this NamespaceDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a NamespaceDecl. Called by Decl::Create.
- static NamespaceDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// ValueDecl - Represent the declaration of a variable (in which case it is
@@ -209,10 +183,6 @@ public:
return D->getKind() >= ValueFirst && D->getKind() <= ValueLast;
}
static bool classof(const ValueDecl *D) { return true; }
-
-protected:
- void EmitInRec(llvm::Serializer& S) const;
- void ReadInRec(llvm::Deserializer& D, ASTContext& C);
};
/// VarDecl - An instance of this class is created to represent a variable
@@ -393,22 +363,6 @@ public:
return D->getKind() >= VarFirst && D->getKind() <= VarLast;
}
static bool classof(const VarDecl *D) { return true; }
-
-protected:
- void EmitInRec(llvm::Serializer& S) const;
- void ReadInRec(llvm::Deserializer& D, ASTContext& C);
-
- void EmitOutRec(llvm::Serializer& S) const;
- void ReadOutRec(llvm::Deserializer& D, ASTContext& C);
-
- /// EmitImpl - Serialize this VarDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// ReadImpl - Deserialize this VarDecl. Called by subclasses.
- virtual void ReadImpl(llvm::Deserializer& D, ASTContext& C);
-
- /// CreateImpl - Deserialize a VarDecl. Called by Decl::Create.
- static VarDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
class ImplicitParamDecl : public VarDecl {
@@ -492,15 +446,6 @@ public:
D->getKind() == OriginalParmVar);
}
static bool classof(const ParmVarDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this ParmVarDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a ParmVarDecl. Called by Decl::Create.
- static ParmVarDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// OriginalParmVarDecl - Represent a parameter to a function, when
@@ -528,18 +473,6 @@ public:
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == OriginalParmVar; }
static bool classof(const OriginalParmVarDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this OriginalParmVarDecl.
- /// Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a OriginalParmVarDecl.
- /// Called by Decl::Create.
- static OriginalParmVarDecl* CreateImpl(llvm::Deserializer& D,
- ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// FunctionDecl - An instance of this class is created to represent a
@@ -765,16 +698,6 @@ public:
static FunctionDecl *castFromDeclContext(const DeclContext *DC) {
return static_cast<FunctionDecl *>(const_cast<DeclContext*>(DC));
}
-
-protected:
- /// EmitImpl - Serialize this FunctionDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a FunctionDecl. Called by Decl::Create.
- static FunctionDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
- friend class CXXRecordDecl;
};
@@ -821,15 +744,6 @@ public:
return D->getKind() >= FieldFirst && D->getKind() <= FieldLast;
}
static bool classof(const FieldDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this FieldDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a FieldDecl. Called by Decl::Create.
- static FieldDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// EnumConstantDecl - An instance of this object exists for each enum constant
@@ -867,15 +781,6 @@ public:
static bool classof(const EnumConstantDecl *D) { return true; }
friend class StmtIteratorBase;
-
-protected:
- /// EmitImpl - Serialize this EnumConstantDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a EnumConstantDecl. Called by Decl::Create.
- static EnumConstantDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
@@ -932,15 +837,6 @@ public:
// Implement isa/cast/dyncast/etc.
static bool classof(const Decl *D) { return D->getKind() == Typedef; }
static bool classof(const TypedefDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this TypedefDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a TypedefDecl. Called by Decl::Create.
- static TypedefDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
class TypedefDecl;
@@ -1090,15 +986,6 @@ public:
static bool classof(const Decl *D) { return D->getKind() == Enum; }
static bool classof(const EnumDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this EnumDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a EnumDecl. Called by Decl::Create.
- static EnumDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
@@ -1202,14 +1089,6 @@ public:
return D->getKind() >= RecordFirst && D->getKind() <= RecordLast;
}
static bool classof(const RecordDecl *D) { return true; }
-protected:
- /// EmitImpl - Serialize this RecordDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a RecordDecl. Called by Decl::Create.
- static RecordDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
class FileScopeAsmDecl : public Decl {
@@ -1228,14 +1107,6 @@ public:
return D->getKind() == FileScopeAsm;
}
static bool classof(const FileScopeAsmDecl *D) { return true; }
-protected:
- /// EmitImpl - Serialize this FileScopeAsmDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a FileScopeAsmDecl. Called by Decl::Create.
- static FileScopeAsmDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// BlockDecl - This represents a block literal declaration, which is like an
@@ -1300,15 +1171,6 @@ public:
static BlockDecl *castFromDeclContext(const DeclContext *DC) {
return static_cast<BlockDecl *>(const_cast<DeclContext*>(DC));
}
-
-protected:
- /// EmitImpl - Serialize this BlockDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a BlockDecl. Called by Decl::Create.
- static BlockDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// Insertion operator for diagnostics. This allows sending NamedDecl's
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 434780baa0..c525be996e 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -297,22 +297,9 @@ public:
static DeclContext *castToDeclContext(const Decl *);
static Decl *castFromDeclContext(const DeclContext *);
- /// Emit - Serialize this Decl to Bitcode.
- void Emit(llvm::Serializer& S) const;
-
- /// Create - Deserialize a Decl from Bitcode.
- static Decl* Create(llvm::Deserializer& D, ASTContext& C);
-
/// Destroy - Call destructors and release memory.
virtual void Destroy(ASTContext& C);
-protected:
- /// EmitImpl - Provides the subclass-specific serialization logic for
- /// serializing out a decl.
- virtual void EmitImpl(llvm::Serializer& S) const {
- // FIXME: This will eventually be a pure virtual function.
- assert (false && "Not implemented.");
- }
private:
const Attr *getAttrsImpl() const;
@@ -800,11 +787,6 @@ private:
void buildLookup(ASTContext &Context, DeclContext *DCtx);
void makeDeclVisibleInContextImpl(ASTContext &Context, NamedDecl *D);
-
- void EmitOutRec(llvm::Serializer& S) const;
- void ReadOutRec(llvm::Deserializer& D, ASTContext& C);
-
- friend class Decl;
};
inline bool Decl::isTemplateParameter() const {
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h
index 5ac9be07f5..b81871ace2 100644
--- a/include/clang/AST/DeclCXX.h
+++ b/include/clang/AST/DeclCXX.h
@@ -44,7 +44,11 @@ protected:
/// Functions - the set of overloaded functions contained in this
/// overload set.
llvm::SmallVector<FunctionDecl *, 4> Functions;
-
+
+ // FIXME: This should go away when we stop using
+ // OverloadedFunctionDecl to store conversions in CXXRecordDecl.
+ friend class CXXRecordDecl;
+
public:
typedef llvm::SmallVector<FunctionDecl *, 4>::iterator function_iterator;
typedef llvm::SmallVector<FunctionDecl *, 4>::const_iterator
@@ -97,18 +101,6 @@ public:
return D->getKind() == OverloadedFunction;
}
static bool classof(const OverloadedFunctionDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this FunctionDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize an OverloadedFunctionDecl. Called by
- /// Decl::Create.
- static OverloadedFunctionDecl* CreateImpl(llvm::Deserializer& D,
- ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
- friend class CXXRecordDecl;
};
/// CXXBaseSpecifier - A base class of a C++ class.
@@ -458,17 +450,6 @@ public:
static bool classof(const ClassTemplateSpecializationDecl *D) {
return true;
}
-
-protected:
- /// EmitImpl - Serialize this CXXRecordDecl. Called by Decl::Emit.
- // FIXME: Implement this.
- //virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a CXXRecordDecl. Called by Decl::Create.
- // FIXME: Implement this.
- static CXXRecordDecl* CreateImpl(Kind DK, llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// CXXMethodDecl - Represents a static or instance method of a
@@ -520,17 +501,6 @@ public:
return D->getKind() >= CXXMethod && D->getKind() <= CXXConversion;
}
static bool classof(const CXXMethodDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this CXXMethodDecl. Called by Decl::Emit.
- // FIXME: Implement this.
- //virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a CXXMethodDecl. Called by Decl::Create.
- // FIXME: Implement this.
- static CXXMethodDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// CXXBaseOrMemberInitializer - Represents a C++ base or member
@@ -727,13 +697,6 @@ public:
return D->getKind() == CXXConstructor;
}
static bool classof(const CXXConstructorDecl *D) { return true; }
- /// EmitImpl - Serialize this CXXConstructorDecl. Called by Decl::Emit.
- // FIXME: Implement this.
- //virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a CXXConstructorDecl. Called by Decl::Create.
- // FIXME: Implement this.
- static CXXConstructorDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// CXXDestructorDecl - Represents a C++ destructor within a
@@ -791,13 +754,6 @@ public:
return D->getKind() == CXXDestructor;
}
static bool classof(const CXXDestructorDecl *D) { return true; }
- /// EmitImpl - Serialize this CXXDestructorDecl. Called by Decl::Emit.
- // FIXME: Implement this.
- //virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a CXXDestructorDecl. Called by Decl::Create.
- // FIXME: Implement this.
- static CXXDestructorDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// CXXConversionDecl - Represents a C++ conversion function within a
@@ -843,13 +799,6 @@ public:
return D->getKind() == CXXConversion;
}
static bool classof(const CXXConversionDecl *D) { return true; }
- /// EmitImpl - Serialize this CXXConversionDecl. Called by Decl::Emit.
- // FIXME: Implement this.
- //virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a CXXConversionDecl. Called by Decl::Create.
- // FIXME: Implement this.
- static CXXConversionDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// LinkageSpecDecl - This represents a linkage specification. For example:
@@ -897,10 +846,6 @@ public:
static LinkageSpecDecl *castFromDeclContext(const DeclContext *DC) {
return static_cast<LinkageSpecDecl *>(const_cast<DeclContext*>(DC));
}
-
-protected:
- void EmitInRec(llvm::Serializer& S) const;
- void ReadInRec(llvm::Deserializer& D, ASTContext& C);
};
/// UsingDirectiveDecl - Represents C++ using-directive. For example:
diff --git a/include/clang/AST/DeclGroup.h b/include/clang/AST/DeclGroup.h
index 65666899e2..15a8adef8e 100644
--- a/include/clang/AST/DeclGroup.h
+++ b/include/clang/AST/DeclGroup.h
@@ -15,7 +15,6 @@
#define LLVM_CLANG_AST_DECLGROUP_H
#include "llvm/Support/DataTypes.h"
-#include "llvm/Bitcode/SerializationFwd.h"
#include <cassert>
namespace clang {
@@ -48,12 +47,6 @@ public:
assert (i < NumDecls && "Out-of-bounds access.");
return *((Decl* const*) (this+1));
}
-
- /// Emit - Serialize a DeclGroup to Bitcode.
- void Emit(llvm::Serializer& S) const;
-
- /// Read - Deserialize a DeclGroup from Bitcode.
- static DeclGroup* Read(llvm::Deserializer& D, ASTContext& C);
};
class DeclGroupRef {
@@ -136,12 +129,6 @@ public:
X.D = static_cast<Decl*>(Ptr);
return X;
}
-
- /// Emit - Serialize a DeclGroupRef to Bitcode.
- void Emit(llvm::Serializer& S) const;
-
- /// Read - Deserialize a DeclGroupRef from Bitcode.
- static DeclGroupRef ReadVal(llvm::Deserializer& D);
};
} // end clang namespace
diff --git a/include/clang/AST/DeclTemplate.h b/include/clang/AST/DeclTemplate.h
index 794ab2cf08..5036127d3f 100644
--- a/include/clang/AST/DeclTemplate.h
+++ b/include/clang/AST/DeclTemplate.h
@@ -271,15 +271,6 @@ public:
return D->getKind() == TemplateTypeParm;
}
static bool classof(const TemplateTypeParmDecl *D) { return true; }
-
-protected:
- /// Serialize this TemplateTypeParmDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// Deserialize a TemplateTypeParmDecl. Called by Decl::Create.
- static TemplateTypeParmDecl* CreateImpl(llvm::Deserializer& D, ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// NonTypeTemplateParmDecl - Declares a non-type template parameter,
@@ -328,16 +319,6 @@ public:
return D->getKind() == NonTypeTemplateParm;
}
static bool classof(const NonTypeTemplateParmDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this TemplateTypeParmDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a TemplateTypeParmDecl. Called by Decl::Create.
- static NonTypeTemplateParmDecl* CreateImpl(llvm::Deserializer& D,
- ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// TemplateTemplateParmDecl - Declares a template template parameter,
@@ -389,16 +370,6 @@ public:
return D->getKind() == TemplateTemplateParm;
}
static bool classof(const TemplateTemplateParmDecl *D) { return true; }
-
-protected:
- /// EmitImpl - Serialize this TemplateTypeParmDecl. Called by Decl::Emit.
- virtual void EmitImpl(llvm::Serializer& S) const;
-
- /// CreateImpl - Deserialize a TemplateTypeParmDecl. Called by Decl::Create.
- static TemplateTemplateParmDecl* CreateImpl(llvm::Deserializer& D,
- ASTContext& C);
-
- friend Decl* Decl::Create(llvm::Deserializer& D, ASTContext& C);
};
/// \brief Represents a template argument within a class template
diff --git a/include/clang/AST/DeclarationName.h b/include/clang/AST/DeclarationName.h
index 729045910b..db140999b0 100644
--- a/include/clang/AST/DeclarationName.h
+++ b/include/clang/AST/DeclarationName.h
@@ -15,7 +15,6 @@
#include "clang/Basic/IdentifierTable.h"
#include "clang/AST/Type.h"
-#include "llvm/Bitcode/SerializationFwd.h"
namespace llvm {
template <typename T> struct DenseMapInfo;
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 7ec0c74e8d..e56101509f 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -294,10 +294,6 @@ public:
T->getStmtClass() <= lastExprConstant;
}
static bool classof(const Expr *) { return true; }
-
- static inline Expr* Create(llvm::Deserializer& D, ASTContext& C) {
- return cast<Expr>(Stmt::Create(D, C));
- }
};
@@ -352,9 +348,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static DeclRefExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// PredefinedExpr - [C99 6.4.2.2] - A predefined identifier such as __func__.
@@ -393,9 +386,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static PredefinedExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
class IntegerLiteral : public Expr {
@@ -432,9 +422,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static IntegerLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
class CharacterLiteral : public Expr {
@@ -469,9 +456,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static CharacterLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
class FloatingLiteral : public Expr {
@@ -511,9 +495,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static FloatingLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// ImaginaryLiteral - We support imaginary integer and floating point literals,
@@ -544,9 +525,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static ImaginaryLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// StringLiteral - This represents a string literal expression, e.g. "foo"
@@ -636,9 +614,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static StringLiteral* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// ParenExpr - This represents a parethesized expression, e.g. "(1)". This
@@ -678,9 +653,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static ParenExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
@@ -782,9 +754,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static UnaryOperator* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
/// SizeOfAlignOfExpr - [C99 6.5.3.4] - This is for sizeof/alignof, both of
@@ -872,9 +841,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static SizeOfAlignOfExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
//===----------------------------------------------------------------------===//
@@ -951,9 +917,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static ArraySubscriptExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C);
};
@@ -1055,10 +1018,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer& S) const;
- static CallExpr* CreateImpl(llvm::Deserializer& D, ASTContext& C,
- StmtClass SC);
};
/// MemberExpr - [C99 6.5.2.3] Structure and Union Members. X->F and X.F.
@@ -1118,9 +1077,6 @@ public:
// Iterators
virtual child_iterator child_begin();
virtual child_iterator child_end();
-
- virtual void EmitImpl(llvm::Serializer&