aboutsummaryrefslogtreecommitdiffstats
path: root/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h')
-rw-r--r--source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h b/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
index 0e959f86fd2a..7553860f2492 100644
--- a/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
+++ b/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
@@ -9,21 +9,23 @@
#ifndef liblldb_ModuleDependencyCollector_h_
#define liblldb_ModuleDependencyCollector_h_
-#include "lldb/Utility/FileCollector.h"
#include "clang/Frontend/Utils.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/FileCollector.h"
namespace lldb_private {
class ModuleDependencyCollectorAdaptor
: public clang::ModuleDependencyCollector {
public:
- ModuleDependencyCollectorAdaptor(FileCollector &file_collector)
+ ModuleDependencyCollectorAdaptor(
+ std::shared_ptr<llvm::FileCollector> file_collector)
: clang::ModuleDependencyCollector(""), m_file_collector(file_collector) {
}
void addFile(llvm::StringRef Filename,
llvm::StringRef FileDst = {}) override {
- m_file_collector.AddFile(Filename);
+ if (m_file_collector)
+ m_file_collector->addFile(Filename);
}
bool insertSeen(llvm::StringRef Filename) override { return false; }
@@ -31,7 +33,7 @@ public:
void writeFileMap() override {}
private:
- FileCollector &m_file_collector;
+ std::shared_ptr<llvm::FileCollector> m_file_collector;
};
} // namespace lldb_private