LLVM
22.0.0git
include
llvm
CAS
FileOffset.h
Go to the documentation of this file.
1
//===----------------------------------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
/// \file
10
/// This file declares interface for FileOffset that represent stored data at an
11
/// offset from the beginning of a file.
12
///
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CAS_FILEOFFSET_H
16
#define LLVM_CAS_FILEOFFSET_H
17
18
#include <cstdlib>
19
20
namespace
llvm::cas
{
21
22
/// FileOffset is a wrapper around `uint64_t` to represent the offset of data
23
/// from the beginning of the file.
24
class
FileOffset
{
25
public
:
26
uint64_t
get
()
const
{
return
Offset; }
27
28
explicit
operator
bool
()
const
{
return
Offset; }
29
30
FileOffset
() =
default
;
31
explicit
FileOffset
(
uint64_t
Offset) : Offset(Offset) {}
32
33
private
:
34
uint64_t
Offset
= 0;
35
};
36
37
}
// namespace llvm::cas
38
39
#endif
// LLVM_CAS_FILEOFFSET_H
bool
llvm::cas::FileOffset::get
uint64_t get() const
Definition
FileOffset.h:26
llvm::cas::FileOffset::FileOffset
FileOffset()=default
llvm::cas::FileOffset::FileOffset
FileOffset(uint64_t Offset)
Definition
FileOffset.h:31
uint64_t
llvm::cas
Definition
ActionCache.h:23
llvm::Offset
@ Offset
Definition
DWP.cpp:477
Generated on
for LLVM by
1.14.0