llvm/llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.cpp

//===- llvm/unittests/tools/llvm-profdata/OutputSizeLimitTest.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
//
//===----------------------------------------------------------------------===//

#include "llvm/ProfileData/SampleProfReader.h"
#include "llvm/ProfileData/SampleProfWriter.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"

usingnamespacellvm;
TempFile;

std::string Input1 =;

const char EmptyProfile[18] =;

/// sys::fs and SampleProf mix Error and error_code, making an adapter class
/// to keep code elegant.
template <typename T> class ExpectedErrorOr : public Expected<T> {};

#define DEF_VAR_RETURN_IF_ERROR(Var, Value)

#define VAR_RETURN_IF_ERROR(Var, Value)

#define RETURN_IF_ERROR(Value)

/// The main testing routine. After rewriting profiles with size limit, check
/// the following:
/// 1. The file size of the new profile is within the size limit.
/// 2. The new profile is a subset of the old profile, and the content of every
/// sample in the new profile is unchanged.
/// Note that even though by default samples with fewest total count are dropped
/// first, this is not a requirement. Samples can be dropped by any order.
static ExpectedErrorOr<void *> RunTest(StringRef Input, size_t SizeLimit,
                                       SampleProfileFormat Format,
                                       bool Compress = false) {}

TEST(TestOutputSizeLimit, TestOutputSizeLimitExtBinary) {}

TEST(TestOutputSizeLimit, TestOutputSizeLimitBinary) {}

TEST(TestOutputSizeLimit, TestOutputSizeLimitText) {}

#if LLVM_ENABLE_ZLIB
TEST(TestOutputSizeLimit, TestOutputSizeLimitExtBinaryCompressed) {}
#endif