LLDB mainline
|
Utility class for a path that can only be set once. More...
Public Member Functions | |
bool | TrySet (llvm::StringRef path) |
Try setting the path. | |
llvm::StringRef | Get () const |
Return the path if there is one. | |
bool | Valid () const |
Returns true iff this path was set exactly once so far. | |
Private Attributes | |
std::string | m_path |
bool | m_valid = false |
bool | m_first = true |
True iff this path hasn't been set yet. | |
Utility class for a path that can only be set once.
Definition at line 24 of file CppModuleConfiguration.h.
|
inline |
Return the path if there is one.
Definition at line 35 of file CppModuleConfiguration.h.
References m_path, and m_valid.
Referenced by lldb_private::CppModuleConfiguration::CppModuleConfiguration(), and lldb_private::CppModuleConfiguration::hasValidConfig().
bool CppModuleConfiguration::SetOncePath::TrySet | ( | llvm::StringRef | path | ) |
Try setting the path.
Returns true if the path was set and false if the path was already set.
Definition at line 18 of file CppModuleConfiguration.cpp.
References m_first, m_path, and m_valid.
Referenced by lldb_private::CppModuleConfiguration::analyzeFile().
|
inline |
Returns true iff this path was set exactly once so far.
Definition at line 40 of file CppModuleConfiguration.h.
References m_valid.
Referenced by lldb_private::CppModuleConfiguration::CppModuleConfiguration(), and lldb_private::CppModuleConfiguration::hasValidConfig().
|
private |
True iff this path hasn't been set yet.
Definition at line 28 of file CppModuleConfiguration.h.
Referenced by TrySet().
|
private |
Definition at line 25 of file CppModuleConfiguration.h.
|
private |
Definition at line 26 of file CppModuleConfiguration.h.