chromium/third_party/perfetto/src/protozero/protoc_plugin/protozero_plugin.cc

/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <stdlib.h>

#include <limits>
#include <map>
#include <memory>
#include <set>
#include <string>

#include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/plugin.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/zero_copy_stream.h>

#include "perfetto/ext/base/string_utils.h"

namespace protozero {
namespace {

Descriptor;
EnumDescriptor;
EnumValueDescriptor;
FieldDescriptor;
FileDescriptor;
GeneratorContext;
Printer;
ZeroCopyOutputStream;
ReplaceAll;
SplitString;
StripChars;
StripPrefix;
StripSuffix;
ToUpper;
Uppercase;

// Keep this value in sync with ProtoDecoder::kMaxDecoderFieldId. If they go out
// of sync pbzero.h files will stop compiling, hitting the at() static_assert.
// Not worth an extra dependency.
constexpr int kMaxDecoderFieldId =;

void Assert(bool condition) {}

struct FileDescriptorComp {};

struct DescriptorComp {};

struct EnumDescriptorComp {};

inline std::string ProtoStubName(const FileDescriptor* proto) {}

class GeneratorJob {};

class ProtoZeroGenerator : public ::google::protobuf::compiler::CodeGenerator {};

ProtoZeroGenerator::ProtoZeroGenerator() {}

ProtoZeroGenerator::~ProtoZeroGenerator() {}

bool ProtoZeroGenerator::Generate(const FileDescriptor* file,
                                  const std::string& options,
                                  GeneratorContext* context,
                                  std::string* error) const {}

}  // namespace
}  // namespace protozero

int main(int argc, char* argv[]) {}