Commit Graph

12 Commits

Author SHA1 Message Date
Kita, Maksim
ea6a2dc094 SR-11889: Fixed code review issues
1. Updated Located field names with Pascal Case
2. Updated Located constuctor
3. Formatted lines with more than 80 symbols
2019-12-20 17:18:59 +03:00
Kita, Maksim
b7cb3b67bf SR-11889: Using Located<T> instead of std::pair<SourceLoc, T> 2019-12-20 17:18:58 +03:00
Robert Widmann
b654bc3589 Force load all members of iterable contexts in the DWARF Importer
The DWARF Importer does not yet know how to answer a request at the level of a single member.  All the tests that saw this as an observable behavior were actually seeing a complete cache fill from lazy member loading an initializer fail over to flushing the member table and rebuilding it by forcing all the members. Given that the cache flush is something we're trying to avoid in general, this is obviously undesirable behavior.

Now that we're no longer flushing the cache for initializers, the DWARF Importer needs to simulate the old behavior and completely deserialize members of loaded types.  This pessimization is justified anyways, considering if you're loading from DWARF, you're probably about to print the type and its fields anyways.
2019-12-18 16:17:10 -08:00
Jordan Rose
d4ac04d25e Move access-path filtering into ModuleNameLookup (out of lookupValue) (#27097)
Removes duplicated logic from the implementations of
FileUnit::lookupValue, and simplifies the interface to
ModuleDecl::lookupValue, where everyone was passing an empty
(non-filtering) access path anyway /except/ during actual lookup from
source code. No functionality change.
2019-09-10 09:13:20 -07:00
Slava Pestov
2256b1fcc2 AST: Introduce namelookup::getAllImports() to replace forAllVisibleModules() 2019-08-29 15:57:38 -04:00
Jordan Rose
5c785d42b3 Enforce that FileUnit + LoadedFile have trivial destructors
We already do this for other ASTContext-allocated types (see
Decl.cpp). This will prevent the sort of mistakes in the previous two
commits.

Note that if any particular subclass of FileUnit wants to have its
destructor run, it can opt into that manually using
ASTContext::addDestructorCleanup. SourceFile and BuiltinUnit both do
this. But we generally don't /want/ to do this if we can avoid it
because it adds to compiler teardown time.
2019-08-23 17:40:46 -07:00
Adrian Prantl
d7c63daf82 DWARFImporter: Allow filtering type lookups by containing module. 2019-08-19 17:24:31 -07:00
Adrian Prantl
1020d8188a Add back the dummy DWARFImporter test to lldb-moduleimport-test. 2019-08-15 16:35:05 -07:00
adrian-prantl
fddc5b17f4 Merge pull request #26681 from adrian-prantl/cleanup-dwarfimporter
Perform miscellaneous cleanups in DWARFImporter.cpp
2019-08-15 16:25:27 -07:00
Adrian Prantl
ff9b7ea83c Perfrom miscellaneous cleanups in DWARFImporter.cpp 2019-08-15 15:07:00 -07:00
Adrian Prantl
476a10a2b0 Add vtable anchor and mark destructor as default. (NFC) 2019-08-15 13:48:49 -07:00
Adrian Prantl
c08a62764a Move DWARFImporterDelegate into ClangImporter and remove DWARFImporter.
This refactors DWARFImporter to become a part of ClangImporter, since
it needs access to many of its implementation details anyway. The
DWARFImporterDelegate is just another mechanism for deserializing
Clang ASTs and once we have a Clang AST, the processing is effectively
the same.
2019-08-14 10:28:50 -07:00