[PATCH] D34267: do more processing in clang-fuzzer (use EmitAssemblyAction)
Kostya Serebryany via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 15 19:06:29 PDT 2017
kcc created this revision.
Herald added a subscriber: mgorny.
use EmitAssemblyAction in clang-fuzzer
https://reviews.llvm.org/D34267
Files:
tools/clang-fuzzer/CMakeLists.txt
tools/clang-fuzzer/ClangFuzzer.cpp
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<tooling::ToolAction> action(
- tooling::newFrontendActionFactory<clang::SyntaxOnlyAction>());
+ tooling::newFrontendActionFactory<clang::EmitAssemblyAction>());
std::shared_ptr<PCHContainerOperations> PCHContainerOps =
std::make_shared<PCHContainerOperations>();
action->runInvocation(std::move(Invocation), Files.get(), PCHContainerOps,
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34267.102772.patch
Type: text/x-patch
Size: 1333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170616/3c19375b/attachment.bin>
More information about the cfe-commits
mailing list