[PATCH] D48106: implemented proto to llvm

2018-06-22 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I think this broke the BUILD_SHARED_LIBS=1 build: https://reviews.llvm.org/D48503 Repository: rC Clang https://reviews.llvm.org/D48106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 152006. emmettneyman added a comment. - actually fixed error statement Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools/clang-fuzzer/cxx_loop

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D48106#1137224, @morehouse wrote: > Looks like `exit(0)` is still there. oops, forgot to `:w` Repository: rC Clang https://reviews.llvm.org/D48106 ___ cfe-commits mailing list cfe-commi

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Looks like `exit(0)` is still there. Repository: rC Clang https://reviews.llvm.org/D48106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 152005. emmettneyman added a comment. - removed unnecessary comment and fixed exit statement Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:50 + errs() << "error: opt level must be between 0 and 3.\n"; + std::exit(0); + }

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 152003. emmettneyman added a comment. - minor changes to improve readability and style Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools/clang

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. If you haven't already, please apply for commit access: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access. That way you can land this after it's accepted. Comment at: tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:23 +#include "llv

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151986. emmettneyman added a comment. - made changes to handle_llvm.cpp in response to reviewer comments Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:71 +return val_var; + } +} morehouse wrote: > Is it still possible for the protobuf to not have a constant, a binOp, or a > varRef? Right now, since the

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/\:113 + + legacy::PassManager PM; + TargetLibraryInfoImpl TLII(Triple(M->getTargetTriple())); morehouse wrote: > Any reason not to use the newer PassManager? Clang (`llc`) and the `l

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/\:62 + initializeScavengerTestPass(*Registry); + +} morehouse wrote: > Does this initialization need to happen every time the fuzzer generates a new > input, or can we call this from

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/CMakeLists.txt:5 + handle_llvm.cpp + ) emmettneyman wrote: > morehouse wrote: > > There's fewer libraries linked here than in `handle-cxx/` (not saying this > > is wrong, but it could

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/CMakeLists.txt:5 + handle_llvm.cpp + ) morehouse wrote: > There's fewer libraries linked here than in `handle-cxx/` (not saying this is > wrong, but it could be). Do you get link e

[PATCH] D48106: implemented proto to llvm

2018-06-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse requested changes to this revision. morehouse added inline comments. This revision now requires changes to proceed. Comment at: tools/clang-fuzzer/CMakeLists.txt:72 + # Build the lllvm protobuf fuzzer + add_clang_executable(clang-llvm-proto-fuzzer l

[PATCH] D48106: implemented proto to llvm

2018-06-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151801. emmettneyman added a comment. - removed unnecessary includes and linked libs Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp tools/clang-f

[PATCH] D48106: implemented proto to llvm

2018-06-18 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151798. emmettneyman added a comment. Implemented HandleLLVM fuzz target -HandleLLVM function compiles LLVM IR -ExampleClangLLVMProtoFuzzer wraps the fuzz target -Next step is to compile at different opt levels and run the executables Repository:

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D48106#1131625, @emmettneyman wrote: > I wanted to implement the proto_to_llvm converter before the fuzz target. The fuzz target should make testing your converter way easier. I'd recommend adding it to this patch so that you're less like

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151240. emmettneyman added a comment. - removed typo in emitted llvm insn Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loo

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman added a comment. In https://reviews.llvm.org/D48106#1130581, @morehouse wrote: > Where is the fuzz target? I wanted to implement the proto_to_llvm converter before the fuzz target. Repository: rC Clang https://reviews.llvm.org/D48106

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151239. emmettneyman added a comment. - refactored loop_proto_to_llvm.cpp Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loo

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Where is the fuzz target? Comment at: tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:33 +int ptr_ctr = 0; +int val_ctr = 0; + I'd suggest wrapper functions that return unused variable names, so your code below won't need to

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151066. emmettneyman added a comment. - fixed proto_to_cxx.cpp Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loop_proto_to_

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman updated this revision to Diff 151063. emmettneyman added a comment. - removed unneeded file Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/CMakeLists.txt tools/clang-fuzzer/cxx_loop_proto.proto tools/clang-fuzzer/proto-to-cxx/loop_proto_to_c

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Emmett Neyman via Phabricator via cfe-commits
emmettneyman created this revision. emmettneyman added reviewers: kcc, vitalybuka, morehouse. Herald added subscribers: cfe-commits, mgorny. implemented proto_to_llvm - also removed div and mod to eliminate UB Repository: rC Clang https://reviews.llvm.org/D48106 Files: tools/clang-fuzzer/