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 | 08899ff85dde961d36bf0c94d07ee3418905d536 (patch) | |
| tree | f62f9495dbc4863310a91c87b36f3a17446beb8d /clang/Driver/RewriteObjC.cpp | |
| parent | 82b6673c44ee0153c5f252f38b95cb21396cc0b2 (diff) | |
| download | bcm5719-llvm-08899ff85dde961d36bf0c94d07ee3418905d536.tar.gz bcm5719-llvm-08899ff85dde961d36bf0c94d07ee3418905d536.zip | |
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).
llvm-svn: 49748
Diffstat (limited to 'clang/Driver/RewriteObjC.cpp')
| -rw-r--r-- | clang/Driver/RewriteObjC.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/Driver/RewriteObjC.cpp b/clang/Driver/RewriteObjC.cpp index a1c29faccc0..724b16e49a8 100644 --- a/clang/Driver/RewriteObjC.cpp +++ b/clang/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()), |

