diff options
author | Steve Naroff <snaroff@apple.com> | 2008-04-15 22:42:06 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-04-15 22:42:06 +0000 |
commit | 248a753f6b670692523c99afaeb8fe98f7ae3ca7 (patch) | |
tree | f51ae4f62f1bdefaf28f672616ec7eaf4ff67f9a /Driver/RewriteObjC.cpp | |
parent | 4b0f81323b518429203051bbcd4864bbf4b000a9 (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 'Driver/RewriteObjC.cpp')
-rw-r--r-- | Driver/RewriteObjC.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp index a1c29faccc..724b16e49a 100644 --- a/Driver/RewriteObjC.cpp +++ b/Driver/RewriteObjC.cpp @@ -70,7 +70,7 @@ namespace { FunctionDecl *SuperContructorFunctionDecl; // ObjC string constant support. - FileVarDecl *ConstantStringClassReference; + VarDecl *ConstantStringClassReference; RecordDecl *NSStringRecord; // ObjC foreach break/continue generation support. @@ -367,7 +367,7 @@ void RewriteObjC::HandleTopLevelDecl(Decl *D) { // 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 @@ Stmt *RewriteObjC::RewriteObjCStringLiteral(ObjCStringLiteral *Exp) { // 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()), |