#include <ClangModulesDeclVendor.h>
|
| ClangModulesDeclVendor () |
|
| ~ClangModulesDeclVendor () override |
|
virtual bool | AddModule (const SourceModule &module, ModuleVector *exported_modules, Stream &error_stream)=0 |
| Add a module to the list of modules to search.
|
|
virtual bool | AddModulesForCompileUnit (CompileUnit &cu, ModuleVector &exported_modules, Stream &error_stream)=0 |
| Add all modules referred to in a given compilation unit to the list of modules to search.
|
|
virtual void | ForEachMacro (const ModuleVector &modules, std::function< bool(llvm::StringRef, llvm::StringRef)> handler)=0 |
| Enumerate all the macros that are defined by a given set of modules that are already imported.
|
|
| ClangDeclVendor (DeclVendorKind kind) |
|
| ~ClangDeclVendor () override=default |
|
uint32_t | FindDecls (ConstString name, bool append, uint32_t max_matches, std::vector< clang::NamedDecl * > &decls) |
|
virtual uint32_t | FindDecls (ConstString name, bool append, uint32_t max_matches, std::vector< CompilerDecl > &decls)=0 |
| Look up the set of Decls that the DeclVendor currently knows about matching a given name.
|
|
| DeclVendor (DeclVendorKind kind) |
|
virtual | ~DeclVendor ()=default |
|
DeclVendorKind | GetKind () const |
|
virtual uint32_t | FindDecls (ConstString name, bool append, uint32_t max_matches, std::vector< CompilerDecl > &decls)=0 |
| Look up the set of Decls that the DeclVendor currently knows about matching a given name.
|
|
std::vector< CompilerType > | FindTypes (ConstString name, uint32_t max_matches) |
| Look up the types that the DeclVendor currently knows about matching a given name.
|
|
Definition at line 22 of file ClangModulesDeclVendor.h.
◆ ModuleID
◆ ModulePath
◆ ModuleVector
◆ ClangModulesDeclVendor()
ClangModulesDeclVendor::ClangModulesDeclVendor |
( |
| ) |
|
◆ ~ClangModulesDeclVendor()
ClangModulesDeclVendor::~ClangModulesDeclVendor |
( |
| ) |
|
|
overridedefault |
◆ AddModule()
Add a module to the list of modules to search.
- Parameters
-
[in] | module | The path to the exact module to be loaded. E.g., if the desired module is std.io, then this should be { "std", "io" }. |
[in] | exported_modules | If non-NULL, a pointer to a vector to populate with the ID of every module that is re-exported by the specified module. |
[in] | error_stream | A stream to populate with the output of the Clang parser when it tries to load the module. |
- Returns
- True if the module could be loaded; false if not. If the compiler encountered a fatal error during a previous module load, then this will always return false for this ModuleImporter.
Referenced by lldb_private::ClangExpressionParser::LLDBPreprocessorCallbacks::moduleImport().
◆ AddModulesForCompileUnit()
virtual bool lldb_private::ClangModulesDeclVendor::AddModulesForCompileUnit |
( |
CompileUnit & |
cu, |
|
|
ModuleVector & |
exported_modules, |
|
|
Stream & |
error_stream |
|
) |
| |
|
pure virtual |
Add all modules referred to in a given compilation unit to the list of modules to search.
- Parameters
-
[in] | cu | The compilation unit to scan for imported modules. |
[in] | exported_modules | A vector to populate with the ID of each module loaded (directly and via re-exports) in this way. |
[in] | error_stream | A stream to populate with the output of the Clang parser when it tries to load the modules. |
- Returns
- True if all modules referred to by the compilation unit could be loaded; false if one could not be loaded. If the compiler encountered a fatal error during a previous module load, then this will always return false for this ModuleImporter.
◆ classof()
static bool lldb_private::ClangModulesDeclVendor::classof |
( |
const DeclVendor * |
vendor | ) |
|
|
inlinestatic |
◆ Create()
Definition at line 640 of file ClangModulesDeclVendor.cpp.
References lldb_private::Expressions, lldb_private::Target::GetArchitecture(), lldb_private::TargetProperties::GetClangModuleSearchPaths(), lldb_private::GetClangResourceDir(), lldb_private::FileSpecList::GetFileSpecAtIndex(), lldb_private::ModuleList::GetGlobalModuleListProperties(), lldb_private::GetLog(), lldb_private::FileSpec::GetPath(), lldb_private::Target::GetPlatform(), lldb_private::FileSpecList::GetSize(), lldb_private::ArchSpec::GetTriple(), lldb_private::FileSystem::Instance(), LLDB_LOG, and ModuleImportBufferName.
Referenced by lldb_private::ClangPersistentVariables::GetClangModulesDeclVendor().
◆ ForEachMacro()
virtual void lldb_private::ClangModulesDeclVendor::ForEachMacro |
( |
const ModuleVector & |
modules, |
|
|
std::function< bool(llvm::StringRef, llvm::StringRef)> |
handler |
|
) |
| |
|
pure virtual |
Enumerate all the macros that are defined by a given set of modules that are already imported.
- Parameters
-
[in] | modules | The unique IDs for all modules to query. Later modules have higher priority, just as if you @imported them in that order. This matters if module A #defines a macro and module B #undefs it. |
[in] | handler | A function to call with the identifier of this macro and the text of each #define (including the #define directive). #undef directives are not included; we simply elide any corresponding #define. If this function returns true, we stop the iteration immediately. |
◆ LanguageSupportsClangModules()
The documentation for this class was generated from the following files: