LIEF: Library to Instrument Executable Formats
Version 1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
MachO
BuildToolVersion.hpp
Go to the documentation of this file.
1
/* Copyright 2017 - 2026 R. Thomas
2
* Copyright 2017 - 2026 Quarkslab
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
#ifndef LIEF_MACHO_BUILD_TOOL_VERSION_COMMAND_H
17
#define LIEF_MACHO_BUILD_TOOL_VERSION_COMMAND_H
18
#include <ostream>
19
#include <array>
20
#include <cstdint>
21
22
#include "
LIEF/Object.hpp
"
23
#include "
LIEF/visibility.h
"
24
25
namespace
LIEF
{
26
namespace
MachO
{
27
28
namespace
details
{
29
struct
build_tool_version;
30
}
31
34
class
LIEF_API
BuildToolVersion
:
public
Object
{
35
public
:
37
using
version_t
= std::array<uint32_t, 3>;
38
39
public
:
40
enum class
TOOLS
{
41
UNKNOWN
= 0,
42
CLANG = 1,
43
SWIFT = 2,
44
LD = 3,
45
LLD = 4,
46
47
METAL = 1024,
48
AIRLLD = 1025,
49
AIRNT = 1026,
50
AIRNT_PLUGIN = 1027,
51
AIRPACK = 1028,
52
GPUARCHIVER = 1031,
53
METAL_FRAMEWORK = 1032,
54
};
55
56
public
:
57
BuildToolVersion
() =
default
;
58
BuildToolVersion
(
const
details::build_tool_version&
tool
);
59
61
TOOLS
tool
()
const
{
62
return
tool_;
63
}
64
66
version_t
version
()
const
{
67
return
version_;
68
}
69
70
~BuildToolVersion
()
override
=
default
;
71
72
void
accept
(
Visitor
& visitor)
const override
;
73
74
LIEF_API
friend
75
std::ostream&
operator<<
(std::ostream& os,
const
BuildToolVersion
&
tool
);
76
77
private
:
78
TOOLS
tool_ =
TOOLS::UNKNOWN
;
79
version_t
version_;
80
};
81
82
LIEF_API
const
char
*
to_string
(
BuildToolVersion::TOOLS
tool);
83
84
}
85
}
86
#endif
Object.hpp
LIEF::MachO::BuildToolVersion::BuildToolVersion
BuildToolVersion()=default
LIEF::MachO::BuildToolVersion::operator<<
friend std::ostream & operator<<(std::ostream &os, const BuildToolVersion &tool)
LIEF::MachO::BuildToolVersion::accept
void accept(Visitor &visitor) const override
LIEF::MachO::BuildToolVersion::version_t
std::array< uint32_t, 3 > version_t
A version is an array of 3 integers.
Definition
BuildToolVersion.hpp:37
LIEF::MachO::BuildToolVersion::version
version_t version() const
Version associated with the tool.
Definition
BuildToolVersion.hpp:66
LIEF::MachO::BuildToolVersion::BuildToolVersion
BuildToolVersion(const details::build_tool_version &tool)
LIEF::MachO::BuildToolVersion::TOOLS
TOOLS
Definition
BuildToolVersion.hpp:40
LIEF::MachO::BuildToolVersion::TOOLS::UNKNOWN
@ UNKNOWN
Definition
BuildToolVersion.hpp:41
LIEF::MachO::BuildToolVersion::tool
TOOLS tool() const
The tools used.
Definition
BuildToolVersion.hpp:61
LIEF::MachO::BuildToolVersion::~BuildToolVersion
~BuildToolVersion() override=default
LIEF::Object::Object
Object()
LIEF::Visitor
Definition
Visitor.hpp:210
LIEF::MachO::details
Definition
endianness_support.hpp:60
LIEF::MachO
Namespace related to the LIEF's Mach-O module.
Definition
Abstract/Header.hpp:36
LIEF::MachO::MACHO_TYPES::UNKNOWN
@ UNKNOWN
Definition
MachO/enums.hpp:24
LIEF::MachO::to_string
const char * to_string(BuildToolVersion::TOOLS tool)
LIEF
LIEF namespace.
Definition
Abstract/Binary.hpp:40
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:41
Generated by
1.17.0