[AMDGPU][AsmParser][NFC] Get rid of custom default operand handlers.
[llvm-project.git] / clang / tools / clang-fuzzer / proto-to-llvm / loop_proto_to_llvm_main.cpp
blobe8b19158f7347729a7ce8a8b163a32e9c8c05bc5
1 //==-- loop_proto_to_llvm_main.cpp - Driver for protobuf-LLVM conversion----==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Implements a simple driver to print a LLVM program from a protobuf with loops
11 //===----------------------------------------------------------------------===//
14 #include <fstream>
15 #include <iostream>
16 #include <streambuf>
17 #include <string>
19 #include "loop_proto_to_llvm.h"
21 int main(int argc, char **argv) {
22 for (int i = 1; i < argc; i++) {
23 std::fstream in(argv[i]);
24 std::string str((std::istreambuf_iterator<char>(in)),
25 std::istreambuf_iterator<char>());
26 std::cout << ";; " << argv[i] << std::endl;
27 std::cout << clang_fuzzer::LoopProtoToLLVM(
28 reinterpret_cast<const uint8_t *>(str.data()), str.size());