#include "llvm/ADT/DenseSet.h"
#include "llvm/Bitcode/BitcodeAnalyzer.h"
#include "llvm/ProfileData/CtxInstrContextNode.h"
#include "llvm/ProfileData/PGOCtxProfReader.h"
#include "llvm/ProfileData/PGOCtxProfWriter.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Testing/Support/SupportHelpers.h"
#include "gtest/gtest.h"
usingnamespacellvm;
usingnamespacellvm::ctx_profile;
class PGOCtxProfRWTest : public ::testing::Test { … };
void checkSame(const ContextNode &Raw, const PGOCtxProfContext &Profile) { … }
TEST_F(PGOCtxProfRWTest, RoundTrip) { … }
TEST_F(PGOCtxProfRWTest, InvalidCounters) { … }
TEST_F(PGOCtxProfRWTest, Empty) { … }
TEST_F(PGOCtxProfRWTest, Invalid) { … }
TEST_F(PGOCtxProfRWTest, ValidButEmpty) { … }
TEST_F(PGOCtxProfRWTest, WrongVersion) { … }
TEST_F(PGOCtxProfRWTest, DuplicateRoots) { … }
TEST_F(PGOCtxProfRWTest, DuplicateTargets) { … }