LLVM
7.0.0
include
llvm
MC
MCSymbolCOFF.h
Go to the documentation of this file.
1
//===- MCSymbolCOFF.h - ----------------------------------------*- C++ -*-===//
2
//
3
// The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#ifndef LLVM_MC_MCSYMBOLCOFF_H
11
#define LLVM_MC_MCSYMBOLCOFF_H
12
13
#include "
llvm/MC/MCSymbol.h
"
14
#include <cstdint>
15
16
namespace
llvm
{
17
18
class
MCSymbolCOFF
:
public
MCSymbol
{
19
/// This corresponds to the e_type field of the COFF symbol.
20
mutable
uint16_t
Type
= 0;
21
22
enum
SymbolFlags : uint16_t {
23
SF_ClassMask = 0x00FF,
24
SF_ClassShift = 0,
25
26
SF_WeakExternal = 0x0100,
27
SF_SafeSEH = 0x0200,
28
};
29
30
public
:
31
MCSymbolCOFF
(
const
StringMapEntry<bool>
*
Name
,
bool
isTemporary
)
32
:
MCSymbol
(
SymbolKindCOFF
, Name, isTemporary) {}
33
34
uint16_t
getType
()
const
{
35
return
Type;
36
}
37
void
setType
(uint16_t Ty)
const
{
38
Type = Ty;
39
}
40
41
uint16_t
getClass
()
const
{
42
return
(
getFlags
() & SF_ClassMask) >> SF_ClassShift;
43
}
44
void
setClass
(uint16_t
StorageClass
)
const
{
45
modifyFlags
(StorageClass << SF_ClassShift, SF_ClassMask);
46
}
47
48
bool
isWeakExternal
()
const
{
49
return
getFlags
() & SF_WeakExternal;
50
}
51
void
setIsWeakExternal
()
const
{
52
modifyFlags
(SF_WeakExternal, SF_WeakExternal);
53
}
54
55
bool
isSafeSEH
()
const
{
56
return
getFlags
() & SF_SafeSEH;
57
}
58
void
setIsSafeSEH
()
const
{
59
modifyFlags
(SF_SafeSEH, SF_SafeSEH);
60
}
61
62
static
bool
classof
(
const
MCSymbol
*S) {
return
S->
isCOFF
(); }
63
};
64
65
}
// end namespace llvm
66
67
#endif // LLVM_MC_MCSYMBOLCOFF_H
llvm::MCSymbol::isCOFF
bool isCOFF() const
Definition:
MCSymbol.h:283
llvm
Compute iterated dominance frontiers using a linear time algorithm.
Definition:
AllocatorList.h:24
llvm::StringMapEntry
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Definition:
StringMap.h:126
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:42
llvm::MCSymbolCOFF::setIsWeakExternal
void setIsWeakExternal() const
Definition:
MCSymbolCOFF.h:51
llvm::MCSymbolCOFF::MCSymbolCOFF
MCSymbolCOFF(const StringMapEntry< bool > *Name, bool isTemporary)
Definition:
MCSymbolCOFF.h:31
llvm::GraphProgram::Name
Name
Definition:
GraphWriter.h:52
llvm::MCSymbolCOFF::setClass
void setClass(uint16_t StorageClass) const
Definition:
MCSymbolCOFF.h:44
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed...
Definition:
Type.h:46
StorageClass
StorageClass
Definition:
MicrosoftDemangle.cpp:131
llvm::MCSymbolCOFF::isWeakExternal
bool isWeakExternal() const
Definition:
MCSymbolCOFF.h:48
llvm::MCSymbol::isTemporary
bool isTemporary() const
isTemporary - Check if this is an assembler temporary symbol.
Definition:
MCSymbol.h:220
llvm::MCSymbolCOFF::classof
static bool classof(const MCSymbol *S)
Definition:
MCSymbolCOFF.h:62
MCSymbol.h
llvm::MCSymbolCOFF::setIsSafeSEH
void setIsSafeSEH() const
Definition:
MCSymbolCOFF.h:58
llvm::MCSymbol::SymbolKindCOFF
Definition:
MCSymbol.h:48
llvm::MCSymbolCOFF::setType
void setType(uint16_t Ty) const
Definition:
MCSymbolCOFF.h:37
llvm::MCSymbolCOFF::isSafeSEH
bool isSafeSEH() const
Definition:
MCSymbolCOFF.h:55
llvm::MCSymbolCOFF
Definition:
MCSymbolCOFF.h:18
llvm::MCSymbolCOFF::getClass
uint16_t getClass() const
Definition:
MCSymbolCOFF.h:41
llvm::MCSymbolCOFF::getType
uint16_t getType() const
Definition:
MCSymbolCOFF.h:34
llvm::MCSymbol::modifyFlags
void modifyFlags(uint32_t Value, uint32_t Mask) const
Modify the flags via a mask.
Definition:
MCSymbol.h:416
llvm::MCSymbol::getFlags
uint32_t getFlags() const
Get the (implementation defined) symbol flags.
Definition:
MCSymbol.h:407
Generated on Thu Aug 23 2018 18:52:37 for LLVM by
1.8.13