diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-30 02:36:12 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-30 02:36:12 +0000 |
commit | 17945a0f64fe03ff6ec0c2146005a87636e3ac12 (patch) | |
tree | 76e53886f0d07ed0cd801ee8820e3f0abca65991 /lib/CodeGen/CodeGenModule.cpp | |
parent | 048f30a483ca352ee7f235a5be181b9dcc5f9d9c (diff) |
De-ASTContext-ify DeclContext.
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index f5a985628b..d88a37a45b 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1262,7 +1262,7 @@ GetAddrOfConstantCFString(const StringLiteral *Literal) { cast<llvm::StructType>(getTypes().ConvertType(CFTy)); std::vector<llvm::Constant*> Fields; - RecordDecl::field_iterator Field = CFRD->field_begin(getContext()); + RecordDecl::field_iterator Field = CFRD->field_begin(); // Class pointer. FieldDecl *CurField = *Field++; @@ -1432,8 +1432,7 @@ llvm::Constant *CodeGenModule::GetAddrOfConstantCString(const std::string &str, void CodeGenModule::EmitObjCPropertyImplementations(const ObjCImplementationDecl *D) { for (ObjCImplementationDecl::propimpl_iterator - i = D->propimpl_begin(getContext()), - e = D->propimpl_end(getContext()); i != e; ++i) { + i = D->propimpl_begin(), e = D->propimpl_end(); i != e; ++i) { ObjCPropertyImplDecl *PID = *i; // Dynamic is just for type-checking. @@ -1445,11 +1444,11 @@ void CodeGenModule::EmitObjCPropertyImplementations(const // we want, that just indicates if the decl came from a // property. What we want to know is if the method is defined in // this implementation. - if (!D->getInstanceMethod(getContext(), PD->getGetterName())) + if (!D->getInstanceMethod(PD->getGetterName())) CodeGenFunction(*this).GenerateObjCGetter( const_cast<ObjCImplementationDecl *>(D), PID); if (!PD->isReadOnly() && - !D->getInstanceMethod(getContext(), PD->getSetterName())) + !D->getInstanceMethod(PD->getSetterName())) CodeGenFunction(*this).GenerateObjCSetter( const_cast<ObjCImplementationDecl *>(D), PID); } @@ -1458,8 +1457,7 @@ void CodeGenModule::EmitObjCPropertyImplementations(const /// EmitNamespace - Emit all declarations in a namespace. void CodeGenModule::EmitNamespace(const NamespaceDecl *ND) { - for (RecordDecl::decl_iterator I = ND->decls_begin(getContext()), - E = ND->decls_end(getContext()); + for (RecordDecl::decl_iterator I = ND->decls_begin(), E = ND->decls_end(); I != E; ++I) EmitTopLevelDecl(*I); } @@ -1471,8 +1469,7 @@ void CodeGenModule::EmitLinkageSpec(const LinkageSpecDecl *LSD) { return; } - for (RecordDecl::decl_iterator I = LSD->decls_begin(getContext()), - E = LSD->decls_end(getContext()); + for (RecordDecl::decl_iterator I = LSD->decls_begin(), E = LSD->decls_end(); I != E; ++I) EmitTopLevelDecl(*I); } |