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
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index a1c29fa..724b16e 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -70,7 +70,7 @@
FunctionDecl *SuperContructorFunctionDecl;
// ObjC string constant support.
- FileVarDecl *ConstantStringClassReference;
+ VarDecl *ConstantStringClassReference;
RecordDecl *NSStringRecord;
// ObjC foreach break/continue generation support.
@@ -367,7 +367,7 @@
// Look for built-in declarations that we need to refer during the rewrite.
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
RewriteFunctionDecl(FD);
- } else if (FileVarDecl *FVD = dyn_cast<FileVarDecl>(D)) {
+ } else if (VarDecl *FVD = dyn_cast<VarDecl>(D)) {
// declared in <Foundation/NSString.h>
if (strcmp(FVD->getName(), "_NSConstantStringClassReference") == 0) {
ConstantStringClassReference = FVD;
@@ -1776,9 +1776,9 @@
// The minus 2 removes the begin/end double quotes.
Preamble += utostr(prettyBuf.str().size()-2) + "};\n";
- FileVarDecl *NewVD = FileVarDecl::Create(*Context, NULL, SourceLocation(),
- &Context->Idents.get(S.c_str()), strType,
- VarDecl::Static, NULL);
+ VarDecl *NewVD = VarDecl::Create(*Context, NULL, SourceLocation(),
+ &Context->Idents.get(S.c_str()), strType,
+ VarDecl::Static, NULL);
DeclRefExpr *DRE = new DeclRefExpr(NewVD, strType, SourceLocation());
Expr *Unop = new UnaryOperator(DRE, UnaryOperator::AddrOf,
Context->getPointerType(DRE->getType()),