1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/tools/llvm-exegesis/lib/SnippetFile.h
Clement Courbet 99df32e39a [llvm-exegesis][NFC] Refactor snippet file reading out of tool main.
Summary: Add unit tests.

Reviewers: gchatelet

Subscribers: mgorny, tschuett, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68212

llvm-svn: 373202
2019-09-30 12:50:25 +00:00

35 lines
1.1 KiB
C++

//===-- SnippetFile.cpp -----------------------------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
///
/// \file
/// Utilities to read a snippet file.
/// Snippet files are just asm files with additional comments to specify which
/// registers should be defined or are live on entry.
///
//===----------------------------------------------------------------------===//
#ifndef LLVM_TOOLS_LLVM_EXEGESIS_SNIPPETFILE_H
#define LLVM_TOOLS_LLVM_EXEGESIS_SNIPPETFILE_H
#include "BenchmarkCode.h"
#include "LlvmState.h"
#include "llvm/Support/Error.h"
#include <vector>
namespace llvm {
namespace exegesis {
// Reads code snippets from file `Filename`.
Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
StringRef Filename);
} // namespace exegesis
} // namespace llvm
#endif