llvm/clang/unittests/Support/TimeProfilerTest.cpp

//===- unittests/Support/TimeProfilerTest.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 "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Lex/PreprocessorOptions.h"

#include "llvm/ADT/StringMap.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/VirtualFileSystem.h"
#include <stack>

#include "gtest/gtest.h"
#include <tuple>

usingnamespaceclang;
usingnamespacellvm;

namespace {

// Should be called before testing.
void setupProfiler() {}

// Should be called after `compileFromString()`.
// Returns profiler's JSON dump.
std::string teardownProfiler() {}

// Returns true if code compiles successfully.
// We only parse AST here. This is enough for constexpr evaluation.
bool compileFromString(StringRef Code, StringRef Standard, StringRef File,
                       llvm::StringMap<std::string> Headers = {}

std::string GetMetadata(json::Object *Event) {}

// Returns pretty-printed trace graph.
std::string buildTraceGraph(StringRef Json) {}

} // namespace

TEST(TimeProfilerTest, ConstantEvaluationCxx20) {}

TEST(TimeProfilerTest, TemplateInstantiations) {}

TEST(TimeProfilerTest, ConstantEvaluationC99) {}