aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclSerialization.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-04-15 22:42:06 +0000
committerSteve Naroff <snaroff@apple.com>2008-04-15 22:42:06 +0000
commit248a753f6b670692523c99afaeb8fe98f7ae3ca7 (patch)
treef51ae4f62f1bdefaf28f672616ec7eaf4ff67f9a /lib/AST/DeclSerialization.cpp
parent4b0f81323b518429203051bbcd4864bbf4b000a9 (diff)
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().
This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclSerialization.cpp')
-rw-r--r--lib/AST/DeclSerialization.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/lib/AST/DeclSerialization.cpp b/lib/AST/DeclSerialization.cpp
index 6b0d7f881a..96df1b7fbf 100644
--- a/lib/AST/DeclSerialization.cpp
+++ b/lib/AST/DeclSerialization.cpp
@@ -41,8 +41,8 @@ Decl* Decl::Create(Deserializer& D, ASTContext& C) {
assert (false && "Not implemented.");
break;
- case BlockVar:
- return BlockVarDecl::CreateImpl(D, C);
+ case Var:
+ return VarDecl::CreateImpl(D, C);
case Enum:
return EnumDecl::CreateImpl(D, C);
@@ -53,9 +53,6 @@ Decl* Decl::Create(Deserializer& D, ASTContext& C) {
case Field:
return FieldDecl::CreateImpl(D, C);
- case FileVar:
- return FileVarDecl::CreateImpl(D, C);
-
case ParmVar:
return ParmVarDecl::CreateImpl(D, C);
@@ -195,13 +192,13 @@ void VarDecl::ReadImpl(Deserializer& D, ASTContext& C) {
}
//===----------------------------------------------------------------------===//
-// BlockVarDecl Serialization.
+// VarDecl Serialization.
//===----------------------------------------------------------------------===//
-BlockVarDecl* BlockVarDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<BlockVarDecl>();
- BlockVarDecl* decl =
- new (Mem) BlockVarDecl(0, SourceLocation(), NULL, QualType(), None, NULL);
+VarDecl* VarDecl::CreateImpl(Deserializer& D, ASTContext& C) {
+ void *Mem = C.getAllocator().Allocate<VarDecl>();
+ VarDecl* decl =
+ new (Mem) VarDecl(Var, 0, SourceLocation(), NULL, QualType(), None, NULL);
decl->VarDecl::ReadImpl(D, C);
@@ -209,21 +206,7 @@ BlockVarDecl* BlockVarDecl::CreateImpl(Deserializer& D, ASTContext& C) {
}
//===----------------------------------------------------------------------===//
-// FileVarDecl Serialization.
-//===----------------------------------------------------------------------===//
-
-FileVarDecl* FileVarDecl::CreateImpl(Deserializer& D, ASTContext& C) {
- void *Mem = C.getAllocator().Allocate<FileVarDecl>();
- FileVarDecl* decl =
- new (Mem) FileVarDecl(0, SourceLocation(), NULL, QualType(), None, NULL);
-
- decl->VarDecl::ReadImpl(D, C);
-
- return decl;
-}
-
-//===----------------------------------------------------------------------===//
-// ParmDecl Serialization.
+// ParmVarDecl Serialization.
//===----------------------------------------------------------------------===//
void ParmVarDecl::EmitImpl(llvm::Serializer& S) const {