llvm-project/lldb
Raphael Isemann 4657a397c2 [lldb][NFC] Remove ClangExternalASTSourceCommon
ClangExternalASTSourceCommon's purpose is to store a map from
Decl*/Type* to ClangASTMetadata. Usually this data is accessed
via the ClangASTContext interface which then grabs the
current ExternalASTSource of its ASTContext, tries to cast it
to ClangExternalASTSourceCommon and then accesses the metadata
map. If the casting fails the setter does nothing and the getter
returns a nullptr as if there was no known metadata for a type/decl.

This system breaks as soon as any non-LLDB ExternalASTSource is added via
a multiplexer to our existing ExternalASTSource (in which case we suddenly
loose all out metadata as the casting always fails with an ExternalASTSource
that is not inheriting from ClangExternalASTSourceCommon).

This patch moves the metadata map to the ClangASTContext. This gets
rid of all the fragile casting, the requirement that every ExternalASTSource in
LLDB has to inherit from ClangExternalASTSourceCommon and simplifies
the metadata implementation to a simple map lookup. As ClangExternalASTSourceCommon
had no other purpose than storing metadata, this patch deletes this class
and replaces all uses with clang::ExternalASTSource.

No other code changes in this commit beside the AppleObjCDeclVendor which
was the only code that did not use the ClangASTContext interface but directly
accessed the ClangExternalASTSourceCommon.
2019-12-24 13:17:27 +01:00
..
cmake [lldb/CMake] Always set a value for find_package when finding optional dependencies 2019-12-23 13:37:58 -08:00
docs [lldb/CMake] Rename LLDB_DISABLE_PYTHON to LLDB_ENABLE_PYTHON 2019-12-13 13:41:11 -08:00
examples [Examples] Move structured-data unpacking out of the loop. (NFC) 2019-11-22 15:43:39 -08:00
include/lldb [lldb][NFC] Remove ClangExternalASTSourceCommon 2019-12-24 13:17:27 +01:00
packages/Python/lldbsuite test: correct flags for Windows 2019-12-23 20:21:26 -08:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [Lldb/Lua] Generate Lua Bindings 2019-12-21 11:28:41 -08:00
source [lldb][NFC] Remove ClangExternalASTSourceCommon 2019-12-24 13:17:27 +01:00
test [lldb/Test] Disable TestSynchronous.test on Windows. 2019-12-23 09:49:22 -08:00
third_party/Python/module Increase timeout in pexpect to lower chances of tests failing under ASAN. 2019-10-10 16:16:49 +00:00
tools [lldb][NFC] Return a reference from ClangASTContext::getASTContext and remove dead nullptr checks 2019-12-21 22:51:35 +01:00
unittests [lldb] Add sanity check to CreateDeclContext and fixed illformed CompilerContext in ClangExpressionDeclMap. 2019-12-23 11:48:02 +01:00
utils [lldb] Respect previously set values of LLDB_TABLEGEN_EXE 2019-12-16 14:31:42 -08:00
.arcconfig
.clang-format
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt build: improve python checks for Windows 2019-12-22 13:57:46 -08:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py