forked from qt-creator/qt-creator
Clang: Use the clang indexer for indexing
It is not removing so much code but will makes somethings easier in the future. We added the SymbolType::Definition too. Change-Id: I4e106b8518e6bfed0c6a4aa6be61c4a5fe5f8bef Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -25,15 +25,16 @@
|
||||
|
||||
#include "collectsymbolsaction.h"
|
||||
|
||||
#include "collectsymbolsconsumer.h"
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
std::unique_ptr<clang::ASTConsumer> CollectSymbolsAction::newASTConsumer()
|
||||
std::unique_ptr<clang::ASTConsumer> CollectSymbolsAction::newASTConsumer(
|
||||
clang::CompilerInstance &compilerInstance,
|
||||
llvm::StringRef inFile)
|
||||
{
|
||||
return std::make_unique<CollectSymbolsConsumer>(m_symbolEntries,
|
||||
m_sourceLocationEntries,
|
||||
m_filePathCache);
|
||||
m_indexDataConsumer->setSourceManager(&compilerInstance.getSourceManager());
|
||||
return m_action.CreateASTConsumer(compilerInstance, inFile);
|
||||
}
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Reference in New Issue
Block a user