@@ -25,21 +25,22 @@ class SupportFileList {
2525 SupportFileList (const SupportFileList &) = delete ;
2626 SupportFileList (SupportFileList &&other) = default ;
2727
28- typedef std::vector<std::unique_ptr <SupportFile>> collection;
28+ typedef std::vector<std::shared_ptr <SupportFile>> collection;
2929 typedef collection::const_iterator const_iterator;
3030 const_iterator begin () const { return m_files.begin (); }
3131 const_iterator end () const { return m_files.end (); }
3232
3333 void Append (const FileSpec &file) {
34- return Append (std::make_unique <SupportFile>(file));
34+ return Append (std::make_shared <SupportFile>(file));
3535 }
36- void Append (std::unique_ptr <SupportFile> &&file) {
36+ void Append (std::shared_ptr <SupportFile> &&file) {
3737 m_files.push_back (std::move (file));
3838 }
3939 // FIXME: Only used by SymbolFilePDB. Replace with a DenseSet at call site.
4040 bool AppendIfUnique (const FileSpec &file);
4141 size_t GetSize () const { return m_files.size (); }
4242 const FileSpec &GetFileSpecAtIndex (size_t idx) const ;
43+ std::shared_ptr<SupportFile> GetSupportFileAtIndex (size_t idx) const ;
4344 size_t FindFileIndex (size_t idx, const FileSpec &file, bool full) const ;
4445 // / Find a compatible file index.
4546 // /
@@ -69,7 +70,7 @@ class SupportFileList {
6970
7071 template <class ... Args> void EmplaceBack (Args &&...args) {
7172 m_files.push_back (
72- std::make_unique <SupportFile>(std::forward<Args>(args)...));
73+ std::make_shared <SupportFile>(std::forward<Args>(args)...));
7374 }
7475
7576protected:
0 commit comments