9#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CPPMODULECONFIGURATION_H
10#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CPPMODULECONFIGURATION_H
13#include <llvm/Support/Regex.h>
33 [[nodiscard]]
bool TrySet(llvm::StringRef path);
35 llvm::StringRef
Get()
const {
36 assert(
m_valid &&
"Called Get() on an invalid SetOncePath?");
69 const llvm::Triple &triple);
Utility class for a path that can only be set once.
bool m_first
True iff this path hasn't been set yet.
llvm::StringRef Get() const
Return the path if there is one.
bool TrySet(llvm::StringRef path)
Try setting the path.
bool Valid() const
Returns true iff this path was set exactly once so far.
A Clang configuration when importing C++ modules.
bool analyzeFile(const FileSpec &f, const llvm::Triple &triple)
Analyze a given source file to build the current configuration.
llvm::ArrayRef< std::string > GetIncludeDirs() const
Returns a list of include directories that should be used when using this configuration (e....
SetOncePath m_c_inc
If valid, the include path to the C library (e.g. /usr/include).
std::string m_resource_inc
The Clang resource include path for this configuration.
bool hasValidConfig()
Returns true iff this is a valid configuration that can be used to load and compile modules.
llvm::ArrayRef< std::string > GetImportedModules() const
Returns a list of (top level) modules that should be imported when using this configuration (e....
std::vector< std::string > m_imported_modules
SetOncePath m_std_target_inc
If valid, the per-target include path used for the std module.
CppModuleConfiguration()=default
Creates an empty and invalid configuration.
SetOncePath m_std_inc
If valid, the include path used for the std module.
SetOncePath m_c_target_inc
If valid, the include path to target-specific C library files (e.g.
std::vector< std::string > m_include_dirs
A class that represents a running process on the host machine.