aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h')
-rw-r--r--src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h b/src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h
index 88ed3d2344..47b86e2219 100644
--- a/src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h
+++ b/src/tools/clangpchmanagerbackend/source/collectbuilddependencytoolaction.h
@@ -60,7 +60,6 @@ public:
diagnosticConsumer);
}
-#if LLVM_VERSION_MAJOR >= 10
std::unique_ptr<clang::FrontendAction> create() override
{
return std::make_unique<CollectBuildDependencyAction>(
@@ -69,15 +68,6 @@ public:
m_excludedIncludeUIDs,
m_alreadyIncludedFileUIDs);
}
-#else
- clang::FrontendAction *create() override
- {
- return new CollectBuildDependencyAction(m_buildDependency,
- m_filePathCache,
- m_excludedIncludeUIDs,
- m_alreadyIncludedFileUIDs);
- }
-#endif
std::vector<uint> generateExcludedIncludeFileUIDs(clang::FileManager &fileManager) const
{
@@ -86,16 +76,12 @@ public:
for (const FilePath &filePath : m_excludedFilePaths) {
NativeFilePath nativeFilePath{filePath};
- const clang::FileEntry *file = fileManager.getFile({nativeFilePath.path().data(),
- nativeFilePath.path().size()},
- true)
-#if LLVM_VERSION_MAJOR >= 10
- .get()
-#endif
- ;
+ auto file = fileManager.getFile({nativeFilePath.path().data(),
+ nativeFilePath.path().size()},
+ true);
if (file)
- fileUIDs.push_back(file->getUID());
+ fileUIDs.push_back(file.get()->getUID());
}
std::sort(fileUIDs.begin(), fileUIDs.end());