fuzzer_util.h 651 B

12345678910111213141516171819
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef EXECUTABLE_SEMANTICS_FUZZING_FUZZER_UTIL_H_
  5. #define EXECUTABLE_SEMANTICS_FUZZING_FUZZER_UTIL_H_
  6. #include "common/fuzzing/carbon.pb.h"
  7. namespace Carbon {
  8. // Converts `compilation_unit` to Carbon. Adds an default `Main()`
  9. // definition if one is not present in the proto.
  10. auto ProtoToCarbonWithMain(const Fuzzing::CompilationUnit& compilation_unit)
  11. -> std::string;
  12. } // namespace Carbon
  13. #endif // EXECUTABLE_SEMANTICS_FUZZING_FUZZER_UTIL_H_