llvm/llvm/tools/llvm-remarkutil/RemarkCount.cpp

//===- RemarkCount.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Count remarks using `instruction-count` for asm-printer remarks and
// `annotation-count` for annotation-remarks
//
//===----------------------------------------------------------------------===//
#include "RemarkUtilHelpers.h"
#include "RemarkUtilRegistry.h"

usingnamespacellvm;
usingnamespaceremarks;
usingnamespacellvm::remarkutil;

static cl::SubCommand InstructionCount(
    "instruction-count",
    "Function instruction count information (requires asm-printer remarks)");
static cl::SubCommand
    AnnotationCount("annotation-count",
                    "Collect count information from annotation remarks (uses "
                    "AnnotationRemarksPass)");

instructioncount // namespace instructioncount

annotationcount // namespace annotationcount

static bool shouldSkipRemark(bool UseDebugLoc, Remark &Remark) {}

namespace instructioncount {
/// Outputs all instruction count remarks in the file as a CSV.
/// \returns Error::success() on success, and an Error otherwise.
static Error tryInstructionCount() {}
} // namespace instructioncount

namespace annotationcount {
static Error tryAnnotationCount() {}
} // namespace annotationcount

static CommandRegistration
    InstructionCountReg(&InstructionCount,
                        instructioncount::tryInstructionCount);
static CommandRegistration Yaml2Bitstream(&AnnotationCount,
                                          annotationcount::tryAnnotationCount);