LLVM
17.0.0git
include
llvm
MC
MCSymbolCOFF.h
Go to the documentation of this file.
1
//===- MCSymbolCOFF.h - ----------------------------------------*- C++ -*-===//
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
#ifndef LLVM_MC_MCSYMBOLCOFF_H
10
#define LLVM_MC_MCSYMBOLCOFF_H
11
12
#include "
llvm/MC/MCSymbol.h
"
13
#include <cstdint>
14
15
namespace
llvm
{
16
17
class
MCSymbolCOFF
:
public
MCSymbol
{
18
/// This corresponds to the e_type field of the COFF symbol.
19
mutable
uint16_t
Type
= 0;
20
21
enum
SymbolFlags :
uint16_t
{
22
SF_ClassMask = 0x00FF,
23
SF_ClassShift = 0,
24
25
SF_WeakExternal = 0x0100,
26
SF_SafeSEH = 0x0200,
27
};
28
29
public
:
30
MCSymbolCOFF
(
const
StringMapEntry<bool>
*
Name
,
bool
isTemporary
)
31
:
MCSymbol
(
SymbolKindCOFF
,
Name
,
isTemporary
) {}
32
33
uint16_t
getType
()
const
{
34
return
Type
;
35
}
36
void
setType
(
uint16_t
Ty)
const
{
37
Type
= Ty;
38
}
39
40
uint16_t
getClass
()
const
{
41
return
(
getFlags
() & SF_ClassMask) >> SF_ClassShift;
42
}
43
void
setClass
(
uint16_t
StorageClass
)
const
{
44
modifyFlags
(
StorageClass
<< SF_ClassShift, SF_ClassMask);
45
}
46
47
bool
isWeakExternal
()
const
{
48
return
getFlags
() & SF_WeakExternal;
49
}
50
void
setIsWeakExternal
()
const
{
51
modifyFlags
(SF_WeakExternal, SF_WeakExternal);
52
}
53
54
bool
isSafeSEH
()
const
{
55
return
getFlags
() & SF_SafeSEH;
56
}
57
void
setIsSafeSEH
()
const
{
58
modifyFlags
(SF_SafeSEH, SF_SafeSEH);
59
}
60
61
static
bool
classof
(
const
MCSymbol
*S) {
return
S->
isCOFF
(); }
62
};
63
64
}
// end namespace llvm
65
66
#endif
// LLVM_MC_MCSYMBOLCOFF_H
Name
std::string Name
Definition:
ELFObjHandler.cpp:77
MCSymbol.h
llvm::MCSymbolCOFF
Definition:
MCSymbolCOFF.h:17
llvm::MCSymbolCOFF::setIsSafeSEH
void setIsSafeSEH() const
Definition:
MCSymbolCOFF.h:57
llvm::MCSymbolCOFF::getType
uint16_t getType() const
Definition:
MCSymbolCOFF.h:33
llvm::MCSymbolCOFF::MCSymbolCOFF
MCSymbolCOFF(const StringMapEntry< bool > *Name, bool isTemporary)
Definition:
MCSymbolCOFF.h:30
llvm::MCSymbolCOFF::setType
void setType(uint16_t Ty) const
Definition:
MCSymbolCOFF.h:36
llvm::MCSymbolCOFF::classof
static bool classof(const MCSymbol *S)
Definition:
MCSymbolCOFF.h:61
llvm::MCSymbolCOFF::isSafeSEH
bool isSafeSEH() const
Definition:
MCSymbolCOFF.h:54
llvm::MCSymbolCOFF::setClass
void setClass(uint16_t StorageClass) const
Definition:
MCSymbolCOFF.h:43
llvm::MCSymbolCOFF::setIsWeakExternal
void setIsWeakExternal() const
Definition:
MCSymbolCOFF.h:50
llvm::MCSymbolCOFF::isWeakExternal
bool isWeakExternal() const
Definition:
MCSymbolCOFF.h:47
llvm::MCSymbolCOFF::getClass
uint16_t getClass() const
Definition:
MCSymbolCOFF.h:40
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:41
llvm::MCSymbol::modifyFlags
void modifyFlags(uint32_t Value, uint32_t Mask) const
Modify the flags via a mask.
Definition:
MCSymbol.h:427
llvm::MCSymbol::getFlags
uint32_t getFlags() const
Get the (implementation defined) symbol flags.
Definition:
MCSymbol.h:418
llvm::MCSymbol::isCOFF
bool isCOFF() const
Definition:
MCSymbol.h:283
llvm::MCSymbol::SymbolKindCOFF
@ SymbolKindCOFF
Definition:
MCSymbol.h:47
llvm::MCSymbol::isTemporary
bool isTemporary() const
isTemporary - Check if this is an assembler temporary symbol.
Definition:
MCSymbol.h:220
llvm::StringMapEntry
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition:
StringMapEntry.h:102
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition:
Type.h:45
uint16_t
llvm::XCOFF::StorageClass
StorageClass
Definition:
XCOFF.h:169
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
Generated on Mon Mar 20 2023 21:54:02 for LLVM by
1.9.6