mini-llvm
0.1.0
Toggle main menu visibility
Loading...
Searching...
No Matches
StackSlot.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: MIT
2
3
#pragma once
4
5
#include "
mini-llvm/utils/Compiler.h
"
6
7
namespace
mini_llvm::mir
{
8
9
class
StackFrame
;
10
11
class
MINI_LLVM_EXPORT
StackSlot
{
12
public
:
13
StackSlot
(
int
size
,
int
alignment
) : size_(
size
), alignment_(
alignment
) {}
14
StackSlot
(
const
StackSlot
&) =
delete
;
15
StackSlot
(
StackSlot
&&) =
delete
;
16
StackSlot
&
operator=
(
const
StackSlot
&) =
delete
;
17
StackSlot
&
operator=
(
StackSlot
&&) =
delete
;
18
19
int
size
()
const
{
20
return
size_;
21
}
22
23
int
alignment
()
const
{
24
return
alignment_;
25
}
26
27
StackFrame
*
frame
()
const
{
28
return
frame_;
29
}
30
31
int
offset
()
const
;
32
33
private
:
34
int
size_, alignment_;
35
mutable
StackFrame
*frame_{};
36
mutable
int
offset_{};
37
38
friend
class
StackFrame
;
39
};
40
41
}
// namespace mini_llvm::mir
Compiler.h
MINI_LLVM_EXPORT
#define MINI_LLVM_EXPORT
Definition
Compiler.h:17
mini_llvm::mir::StackFrame
Definition
StackFrame.h:17
mini_llvm::mir::StackSlot::offset
int offset() const
mini_llvm::mir::StackSlot::StackSlot
StackSlot(StackSlot &&)=delete
mini_llvm::mir::StackSlot::StackSlot
StackSlot(const StackSlot &)=delete
mini_llvm::mir::StackSlot::alignment
int alignment() const
Definition
StackSlot.h:23
mini_llvm::mir::StackSlot::frame
StackFrame * frame() const
Definition
StackSlot.h:27
mini_llvm::mir::StackSlot::StackFrame
friend class StackFrame
Definition
StackSlot.h:38
mini_llvm::mir::StackSlot::StackSlot
StackSlot(int size, int alignment)
Definition
StackSlot.h:13
mini_llvm::mir::StackSlot::size
int size() const
Definition
StackSlot.h:19
mini_llvm::mir::StackSlot::operator=
StackSlot & operator=(const StackSlot &)=delete
mini_llvm::mir::StackSlot::operator=
StackSlot & operator=(StackSlot &&)=delete
mini_llvm::mir
Definition
BasicBlock.h:22
include
mini-llvm
mir
StackSlot.h
Generated by
1.17.0