mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 22:16:46 +00:00

- define a common data structure Language which is a compiled result of the bnf grammar. It is defined in Language.h; - creates a clangPseudoCLI lib which defines a grammar commandline flag and expose a function to get the Language. It supports --grammar=cxx, --grammmar=/path/to/file.bnf; - use the clangPseudoCLI in clang-pseudo, fuzzer, and benchmark tools ( simplify the code and use the prebuilt cxx grammar); Split out from https://reviews.llvm.org/D127448. Differential Revision: https://reviews.llvm.org/D128679
17 lines
236 B
CMake
17 lines
236 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
FuzzerCLI
|
|
Support
|
|
)
|
|
|
|
add_llvm_fuzzer(clang-pseudo-fuzzer
|
|
Fuzzer.cpp
|
|
DUMMY_MAIN Main.cpp
|
|
)
|
|
|
|
target_link_libraries(clang-pseudo-fuzzer
|
|
PRIVATE
|
|
clangPseudo
|
|
clangPseudoCLI
|
|
clangPseudoGrammar
|
|
)
|