9#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CXXMODULEHANDLER_H
10#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CXXMODULEHANDLER_H
12#include "clang/AST/ASTImporter.h"
13#include "clang/Sema/Sema.h"
14#include "llvm/ADT/StringSet.h"
57 std::optional<clang::Decl *>
Import(clang::Decl *d);
Handles importing decls into an ASTContext with an attached C++ module.
clang::Sema * m_sema
The Sema instance of the target ASTContext.
bool isValid() const
Returns true iff this instance is capable of importing any declarations in the target ASTContext.
CxxModuleHandler()=default
CxxModuleHandler(clang::ASTImporter &importer, clang::ASTContext *target)
std::optional< clang::Decl * > Import(clang::Decl *d)
Attempts to import the given decl into the target ASTContext by deserializing it from the 'std' modul...
clang::ASTImporter * m_importer
The ASTImporter that should be used to import any Decls which aren't directly handled by this class i...
std::optional< clang::Decl * > tryInstantiateStdTemplate(clang::Decl *d)
Tries to manually instantiate the given foreign template in the target context (designated by m_sema)...
llvm::StringSet m_supported_templates
List of template names this class currently supports.
A class that represents a running process on the host machine.