LLVM
20.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/TextAPI/Record.h
"
17
#include "
llvm/TextAPI/SymbolSet.h
"
18
19
namespace
llvm
{
20
namespace
MachO {
21
22
/// Base class for any usage of traversing over collected Records.
23
class
RecordVisitor
{
24
public
:
25
virtual
~RecordVisitor
();
26
27
virtual
void
visitGlobal
(
const
GlobalRecord
&) = 0;
28
virtual
void
visitObjCInterface
(
const
ObjCInterfaceRecord
&);
29
virtual
void
visitObjCCategory
(
const
ObjCCategoryRecord
&);
30
};
31
32
/// Specialized RecordVisitor for collecting exported symbols
33
/// and undefined symbols if RecordSlice being visited represents a
34
/// flat-namespaced library.
35
class
SymbolConverter
:
public
RecordVisitor
{
36
public
:
37
SymbolConverter
(
SymbolSet
*Symbols,
const
Target
&
T
,
38
const
bool
RecordUndefs =
false
)
39
: Symbols(Symbols), Targ(
T
), RecordUndefs(RecordUndefs) {}
40
void
visitGlobal
(
const
GlobalRecord
&)
override
;
41
void
visitObjCInterface
(
const
ObjCInterfaceRecord
&)
override
;
42
void
visitObjCCategory
(
const
ObjCCategoryRecord
&)
override
;
43
44
private
:
45
void
addIVars(
const
ArrayRef<ObjCIVarRecord *>
,
StringRef
ContainerName);
46
SymbolSet
*Symbols;
47
const
Target
Targ;
48
const
bool
RecordUndefs;
49
};
50
51
}
// end namespace MachO.
52
}
// end namespace llvm.
53
54
#endif
// LLVM_TEXTAPI_RECORDVISITOR_H
SymbolSet.h
Record.h
Implements the TAPI Record Types.
T
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:119
llvm::MachO::ObjCCategoryRecord
Definition:
Record.h:178
llvm::MachO::ObjCInterfaceRecord
Definition:
Record.h:191
llvm::MachO::RecordVisitor
Base class for any usage of traversing over collected Records.
Definition:
RecordVisitor.h:23
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::RecordVisitor::~RecordVisitor
virtual ~RecordVisitor()
Definition:
RecordVisitor.cpp:18
llvm::MachO::SymbolConverter
Specialized RecordVisitor for collecting exported symbols and undefined symbols if RecordSlice being ...
Definition:
RecordVisitor.h:35
llvm::MachO::SymbolConverter::visitObjCInterface
void visitObjCInterface(const ObjCInterfaceRecord &) override
Definition:
RecordVisitor.cpp:59
llvm::MachO::SymbolConverter::visitObjCCategory
void visitObjCCategory(const ObjCCategoryRecord &) override
Definition:
RecordVisitor.cpp:90
llvm::MachO::SymbolConverter::visitGlobal
void visitGlobal(const GlobalRecord &) override
Definition:
RecordVisitor.cpp:30
llvm::MachO::SymbolConverter::SymbolConverter
SymbolConverter(SymbolSet *Symbols, const Target &T, const bool RecordUndefs=false)
Definition:
RecordVisitor.h:37
llvm::MachO::SymbolSet
Definition:
SymbolSet.h:76
llvm::MachO::Target
Definition:
Target.h:28
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:50
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
Generated on Thu Nov 21 2024 00:08:42 for LLVM by
1.9.6