Index: tools/clang-fuzzer/CMakeLists.txt =================================================================== --- tools/clang-fuzzer/CMakeLists.txt +++ tools/clang-fuzzer/CMakeLists.txt @@ -9,6 +9,7 @@ target_link_libraries(clang-fuzzer ${CLANG_FORMAT_LIB_DEPS} clangAST + clangCodeGen clangBasic clangDriver clangFrontend Index: tools/clang-fuzzer/ClangFuzzer.cpp =================================================================== --- tools/clang-fuzzer/ClangFuzzer.cpp +++ tools/clang-fuzzer/ClangFuzzer.cpp @@ -15,6 +15,7 @@ #include "clang/Tooling/Tooling.h" #include "clang/Frontend/FrontendActions.h" +#include "clang/CodeGen/CodeGenAction.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Lex/PreprocessorOptions.h" #include "llvm/Option/Option.h" @@ -39,7 +40,7 @@ llvm::MemoryBuffer::getMemBuffer(s); Invocation->getPreprocessorOpts().addRemappedFile("./test.cc", Input.release()); std::unique_ptr action( - tooling::newFrontendActionFactory()); + tooling::newFrontendActionFactory()); std::shared_ptr PCHContainerOps = std::make_shared(); action->runInvocation(std::move(Invocation), Files.get(), PCHContainerOps,