LLVM
22.0.0git
include
llvm
TextAPI
RecordVisitor.h
Go to the documentation of this file.
1
//===- llvm/TextAPI/RecordSlice.h - TAPI RecordSlice ------------*- 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
/// Defines the TAPI Record Visitor.
10
///
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_TEXTAPI_RECORDVISITOR_H
14
#define LLVM_TEXTAPI_RECORDVISITOR_H
15
16
#include "
llvm/Support/Compiler.h
"
17
#include "
llvm/TextAPI/Record.h
"
18
#include "
llvm/TextAPI/SymbolSet.h
"
19
20
namespace
llvm
{
21
namespace
MachO
{
22
23
/// Base class for any usage of traversing over collected Records.
24
class
LLVM_ABI
RecordVisitor
{
25
public
:
26
virtual
~RecordVisitor
();
27
28
virtual
void
visitGlobal
(
const
GlobalRecord
&) = 0;
29
virtual
void
visitObjCInterface
(
const
ObjCInterfaceRecord
&);
30
virtual
void
visitObjCCategory
(
const
ObjCCategoryRecord
&);
31
};
32
33
/// Specialized RecordVisitor for collecting exported symbols
34
/// and undefined symbols if RecordSlice being visited represents a
35
/// flat-namespaced library.
36
class
LLVM_ABI
SymbolConverter
:
public
RecordVisitor
{
37
public
:
38
SymbolConverter
(
SymbolSet
*Symbols,
const
Target
&
T
,
39
const
bool
RecordUndefs =
false
)
40
: Symbols(Symbols), Targ(
T
), RecordUndefs(RecordUndefs) {}
41
void
visitGlobal(
const
GlobalRecord
&)
override
;
42
void
visitObjCInterface(
const
ObjCInterfaceRecord
&)
override
;
43
void
visitObjCCategory(
const
ObjCCategoryRecord
&)
override
;
44
45
private
:
46
void
addIVars(
const
ArrayRef<ObjCIVarRecord *>
,
StringRef
ContainerName);
47
SymbolSet
*Symbols;
48
const
Target
Targ;
49
const
bool
RecordUndefs;
50
};
51
52
}
// end namespace MachO.
53
}
// end namespace llvm.
54
55
#endif
// LLVM_TEXTAPI_RECORDVISITOR_H
Compiler.h
LLVM_ABI
#define LLVM_ABI
Definition
Compiler.h:213
T
#define T
Definition
Mips16ISelLowering.cpp:353
SymbolSet.h
Record.h
Implements the TAPI Record Types.
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition
ArrayRef.h:41
llvm::MachO::GlobalRecord
Definition
Record.h:120
llvm::MachO::ObjCCategoryRecord
Definition
Record.h:179
llvm::MachO::ObjCInterfaceRecord
Definition
Record.h:192
llvm::MachO::RecordVisitor
Base class for any usage of traversing over collected Records.
Definition
RecordVisitor.h:24
llvm::MachO::RecordVisitor::visitGlobal
virtual void visitGlobal(const GlobalRecord &)=0
llvm::MachO::RecordVisitor::visitObjCCategory
virtual void visitObjCCategory(const ObjCCategoryRecord &)
Definition
RecordVisitor.cpp:20
llvm::MachO::RecordVisitor::visitObjCInterface
virtual void visitObjCInterface(const ObjCInterfaceRecord &)
Definition
RecordVisitor.cpp:19
llvm::MachO::SymbolConverter::SymbolConverter
SymbolConverter(SymbolSet *Symbols, const Target &T, const bool RecordUndefs=false)
Definition
RecordVisitor.h:38
llvm::MachO::SymbolSet
Definition
SymbolSet.h:77
llvm::MachO::Target
Definition
Target.h:29
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition
StringRef.h:55
llvm::MachO
Definition
MachO.h:25
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition
AddressRanges.h:18
Generated on
for LLVM by
1.14.0