File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -165,9 +165,6 @@ class MachObjectWriter : public MCObjectWriter {
165
165
166
166
// / @}
167
167
168
- // Used to communicate Linker Optimization Hint information.
169
- MCLOHContainer LOHContainer;
170
-
171
168
VersionInfoType VersionInfo{};
172
169
VersionInfoType TargetVariantVersionInfo{};
173
170
@@ -219,7 +216,6 @@ class MachObjectWriter : public MCObjectWriter {
219
216
return SectionOrder;
220
217
}
221
218
SectionAddrMap &getSectionAddressMap () { return SectionAddress; }
222
- MCLOHContainer &getLOHContainer () { return LOHContainer; }
223
219
224
220
uint64_t getSectionAddress (const MCSection *Sec) const {
225
221
return SectionAddress.lookup (Sec);
Original file line number Diff line number Diff line change 10
10
#define LLVM_MC_MCOBJECTWRITER_H
11
11
12
12
#include " llvm/MC/MCDirectives.h"
13
+ #include " llvm/MC/MCLinkerOptimizationHint.h"
13
14
#include " llvm/MC/MCSymbol.h"
14
15
#include " llvm/TargetParser/Triple.h"
15
16
#include < cstdint>
@@ -36,6 +37,9 @@ class MCObjectWriter {
36
37
// The list of linker options for LC_LINKER_OPTION.
37
38
std::vector<std::vector<std::string>> LinkerOptions;
38
39
40
+ // Used to communicate Linker Optimization Hint information.
41
+ MCLOHContainer LOHContainer;
42
+
39
43
// / List of declared file names
40
44
SmallVector<std::pair<std::string, size_t >, 0 > FileNames;
41
45
// XCOFF specific: Optional compiler version.
@@ -68,6 +72,8 @@ class MCObjectWriter {
68
72
return LinkerOptions;
69
73
}
70
74
75
+ MCLOHContainer &getLOHContainer () { return LOHContainer; }
76
+
71
77
// / Perform any late binding of symbols (for example, to assign symbol
72
78
// / indices for use when generating relocations).
73
79
// /
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class MCMachOStreamer : public MCObjectStreamer {
124
124
}
125
125
126
126
void emitLOHDirective (MCLOHType Kind, const MCLOHArgs &Args) override {
127
- getWriter ().getLOHContainer ().addDirective (Kind, Args);
127
+ getMCObjectWriter ().getLOHContainer ().addDirective (Kind, Args);
128
128
}
129
129
void emitCGProfileEntry (const MCSymbolRefExpr *From,
130
130
const MCSymbolRefExpr *To, uint64_t Count) override {
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ void MCObjectWriter::reset() {
26
26
SubsectionsViaSymbols = false ;
27
27
CGProfile.clear ();
28
28
LinkerOptions.clear ();
29
+ LOHContainer.reset ();
29
30
}
30
31
31
32
bool MCObjectWriter::isSymbolRefDifferenceFullyResolved (
You can’t perform that action at this time.
0 commit comments