Clang: Collect source files

Change-Id: If0183cafd00ed7e42bacbdb72a1d65624dc03cee
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2017-10-26 13:23:27 +02:00
parent 32f2169f77
commit 3c43e5d7ec
17 changed files with 218 additions and 66 deletions

View File

@@ -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