aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h')
-rw-r--r--contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h b/contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
index 93f191b49985..89e853ab599d 100644
--- a/contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
+++ b/contrib/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
@@ -112,10 +112,13 @@ public:
/// the compile unit is optimized will be made when
/// CompileUnit::GetIsOptimized() is called.
///
+ /// \param[in] support_files
+ /// An rvalue list of already parsed support files.
/// \see lldb::LanguageType
CompileUnit(const lldb::ModuleSP &module_sp, void *user_data,
const FileSpec &file_spec, lldb::user_id_t uid,
- lldb::LanguageType language, lldb_private::LazyBool is_optimized);
+ lldb::LanguageType language, lldb_private::LazyBool is_optimized,
+ SupportFileList &&support_files = {});
/// Add a function to this compile unit.
///
@@ -226,6 +229,9 @@ public:
/// Return the primary source file associated with this compile unit.
const FileSpec &GetPrimaryFile() const { return m_file_spec; }
+ /// Return the primary source file associated with this compile unit.
+ void SetPrimaryFile(const FileSpec &fs) { m_file_spec = fs; }
+
/// Get the line table for the compile unit.
///
/// Called by clients and the SymbolFile plug-in. The SymbolFile plug-ins
@@ -265,7 +271,13 @@ public:
///
/// \return
/// A support file list object.
- const FileSpecList &GetSupportFiles();
+ const SupportFileList &GetSupportFiles();
+
+ /// Used by plugins that parse the support file list.
+ SupportFileList &GetSupportFileList() {
+ m_flags.Set(flagsParsedSupportFiles);
+ return m_support_files;
+ }
/// Get the compile unit's imported module list.
///
@@ -331,8 +343,6 @@ public:
/// A line table object pointer that this object now owns.
void SetLineTable(LineTable *line_table);
- void SetSupportFiles(FileSpecList support_files);
-
void SetDebugMacros(const DebugMacrosSP &debug_macros);
/// Set accessor for the variable list.
@@ -410,9 +420,8 @@ protected:
std::vector<SourceModule> m_imported_modules;
/// The primary file associated with this compile unit.
FileSpec m_file_spec;
- /// Files associated with this compile unit's line table and
- /// declarations.
- FileSpecList m_support_files;
+ /// Files associated with this compile unit's line table and declarations.
+ SupportFileList m_support_files;
/// Line table that will get parsed on demand.
std::unique_ptr<LineTable> m_line_table_up;
/// Debug macros that will get parsed on demand.