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
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index b7ab863..6f2fc5e 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -65,7 +65,7 @@
NamespaceSet &Visited) {
DeclContext::udir_iterator I, End;
- for (llvm::tie(I, End) = NS->getUsingDirectives(Context); I !=End; ++I) {
+ for (llvm::tie(I, End) = NS->getUsingDirectives(); I !=End; ++I) {
UDirs.push_back(*I);
std::push_heap(UDirs.begin(), UDirs.end(), UsingDirAncestorCompare());
NamespaceDecl *Nominated = (*I)->getNominatedNamespace();
@@ -609,7 +609,7 @@
// Perform qualified name lookup into the LookupCtx.
DeclContext::lookup_iterator I, E;
- for (llvm::tie(I, E) = NS->lookup(Context, Name); I != E; ++I)
+ for (llvm::tie(I, E) = NS->lookup(Name); I != E; ++I)
if (Sema::isAcceptableLookupResult(*I, NameKind, IDNS)) {
Results.push_back(Sema::LookupResult::CreateLookupResult(Context, I, E));
break;
@@ -1005,7 +1005,7 @@
// Perform qualified name lookup into the LookupCtx.
DeclContext::lookup_iterator I, E;
- for (llvm::tie(I, E) = LookupCtx->lookup(Context, Name); I != E; ++I)
+ for (llvm::tie(I, E) = LookupCtx->lookup(Name); I != E; ++I)
if (isAcceptableLookupResult(*I, NameKind, IDNS))
return LookupResult::CreateLookupResult(Context, I, E);
@@ -1148,7 +1148,7 @@
// (C++0x [temp.dep.type]).
unsigned IDNS = getIdentifierNamespacesFromLookupNameKind(NameKind, true);
DeclContext::lookup_iterator I, E;
- for (llvm::tie(I, E) = Current->lookup(Context, Name); I != E; ++I)
+ for (llvm::tie(I, E) = Current->lookup(Name); I != E; ++I)
if (isAcceptableLookupResult(*I, NameKind, IDNS))
return LookupResult::CreateLookupResult(Context, I, E);
}
@@ -1656,7 +1656,7 @@
// namespaces even if they are not visible during an ordinary
// lookup (11.4).
DeclContext::lookup_iterator I, E;
- for (llvm::tie(I, E) = (*NS)->lookup(Context, Name); I != E; ++I) {
+ for (llvm::tie(I, E) = (*NS)->lookup(Name); I != E; ++I) {
if (FunctionDecl *Func = dyn_cast<FunctionDecl>(*I))
Functions.insert(Func);
else if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(*I))
@@ -1667,7 +1667,7 @@
if (GlobalScope) {
DeclContext::lookup_iterator I, E;
for (llvm::tie(I, E)
- = Context.getTranslationUnitDecl()->lookup(Context, Name);
+ = Context.getTranslationUnitDecl()->lookup(Name);
I != E; ++I) {
if (FunctionDecl *Func = dyn_cast<FunctionDecl>(*I))
Functions.insert(Func);