forked from qt-creator/qt-creator
Clang: Collect source files
Change-Id: If0183cafd00ed7e42bacbdb72a1d65624dc03cee Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -24,12 +24,21 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "collectmacrossourcefilecallbacks.h"
|
||||
#include "collectmacrospreprocessorcallbacks.h"
|
||||
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
|
||||
|
||||
namespace ClangBackEnd {
|
||||
|
||||
CollectMacrosSourceFileCallbacks::CollectMacrosSourceFileCallbacks()
|
||||
bool CollectMacrosSourceFileCallbacks::handleBeginSource(clang::CompilerInstance &compilerInstance)
|
||||
{
|
||||
auto callbacks = std::make_unique<CollectMacrosPreprocessorCallbacks>(m_sourceFiles,
|
||||
m_filePathCache);
|
||||
|
||||
compilerInstance.getPreprocessorPtr()->addPPCallbacks(std::move(callbacks));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
Reference in New Issue
Block a user