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 | cfbfe78e9e4a5b95196361a0038e839889ea2257 (patch) | |
tree | b7432ee1195c0fe35ee86eb00bd63b25480a457f /clang/lib/Frontend/PCHWriter.cpp | |
parent | e3d025995c4408b8ab2b717c5f08f1f9d967b6f4 (diff) | |
download | bcm5719-llvm-cfbfe78e9e4a5b95196361a0038e839889ea2257.tar.gz bcm5719-llvm-cfbfe78e9e4a5b95196361a0038e839889ea2257.zip |
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.
llvm-svn: 74506
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index e93219e01d5..41a50254558 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -1064,14 +1064,13 @@ void PCHWriter::WriteTypesBlock(ASTContext &Context) { /// bistream, or 0 if no block was written. uint64_t PCHWriter::WriteDeclContextLexicalBlock(ASTContext &Context, DeclContext *DC) { - if (DC->decls_empty(Context)) + if (DC->decls_empty()) return 0; uint64_t Offset = Stream.GetCurrentBitNo(); RecordData Record; - for (DeclContext::decl_iterator D = DC->decls_begin(Context), - DEnd = DC->decls_end(Context); - D != DEnd; ++D) + for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd = DC->decls_end(); + D != DEnd; ++D) AddDeclRef(*D, Record); ++NumLexicalDeclContexts; @@ -1097,7 +1096,7 @@ uint64_t PCHWriter::WriteDeclContextVisibleBlock(ASTContext &Context, return 0; // Force the DeclContext to build a its name-lookup table. - DC->lookup(Context, DeclarationName()); + DC->lookup(DeclarationName()); // Serialize the contents of the mapping used for lookup. Note that, // although we have two very different code paths, the serialized |