@@ -25,21 +25,22 @@ class SupportFileList {
25
25
SupportFileList (const SupportFileList &) = delete ;
26
26
SupportFileList (SupportFileList &&other) = default ;
27
27
28
- typedef std::vector<std::unique_ptr <SupportFile>> collection;
28
+ typedef std::vector<std::shared_ptr <SupportFile>> collection;
29
29
typedef collection::const_iterator const_iterator;
30
30
const_iterator begin () const { return m_files.begin (); }
31
31
const_iterator end () const { return m_files.end (); }
32
32
33
33
void Append (const FileSpec &file) {
34
- return Append (std::make_unique <SupportFile>(file));
34
+ return Append (std::make_shared <SupportFile>(file));
35
35
}
36
- void Append (std::unique_ptr <SupportFile> &&file) {
36
+ void Append (std::shared_ptr <SupportFile> &&file) {
37
37
m_files.push_back (std::move (file));
38
38
}
39
39
// FIXME: Only used by SymbolFilePDB. Replace with a DenseSet at call site.
40
40
bool AppendIfUnique (const FileSpec &file);
41
41
size_t GetSize () const { return m_files.size (); }
42
42
const FileSpec &GetFileSpecAtIndex (size_t idx) const ;
43
+ std::shared_ptr<SupportFile> GetSupportFileAtIndex (size_t idx) const ;
43
44
size_t FindFileIndex (size_t idx, const FileSpec &file, bool full) const ;
44
45
// / Find a compatible file index.
45
46
// /
@@ -69,7 +70,7 @@ class SupportFileList {
69
70
70
71
template <class ... Args> void EmplaceBack (Args &&...args) {
71
72
m_files.push_back (
72
- std::make_unique <SupportFile>(std::forward<Args>(args)...));
73
+ std::make_shared <SupportFile>(std::forward<Args>(args)...));
73
74
}
74
75
75
76
protected:
0 commit comments