forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information
Showing
9 changed files
with
33 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.