LLVM 24.0.0git
MCMachOStreamer.cpp
Go to the documentation of this file.
1//===- MCMachOStreamer.cpp - MachO Streamer -------------------------------===//
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#include "llvm/ADT/DenseMap.h"
11#include "llvm/ADT/StringRef.h"
14#include "llvm/MC/MCAssembler.h"
16#include "llvm/MC/MCContext.h"
18#include "llvm/MC/MCExpr.h"
19#include "llvm/MC/MCFixup.h"
25#include "llvm/MC/MCSection.h"
27#include "llvm/MC/MCSymbol.h"
29#include "llvm/MC/MCValue.h"
30#include "llvm/MC/SectionKind.h"
34#include <cassert>
35#include <vector>
36
37namespace llvm {
38class MCInst;
39class MCStreamer;
40class MCSubtargetInfo;
41class Triple;
42} // namespace llvm
43
44using namespace llvm;
45
46namespace {
47
48class MCMachOStreamer : public MCObjectStreamer {
49private:
50 /// LabelSections - true if each section change should emit a linker local
51 /// label for use in relocations for assembler local references. Obviates the
52 /// need for local relocations. False by default.
53 bool LabelSections;
54
55 /// HasSectionLabel - map of which sections have already had a non-local
56 /// label emitted to them. Used so we don't emit extraneous linker local
57 /// labels in the middle of the section.
58 DenseMap<const MCSection*, bool> HasSectionLabel;
59
60 void emitDataRegion(MachO::DataRegionType Kind);
61 void emitDataRegionEnd();
62
63public:
64 MCMachOStreamer(MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
65 std::unique_ptr<MCObjectWriter> OW,
66 std::unique_ptr<MCCodeEmitter> Emitter, bool label)
67 : MCObjectStreamer(Context, std::move(MAB), std::move(OW),
68 std::move(Emitter)),
69 LabelSections(label) {}
70
71 /// state management
72 void reset() override {
73 HasSectionLabel.clear();
75 }
76
77 MachObjectWriter &getWriter() {
78 return static_cast<MachObjectWriter &>(getAssembler().getWriter());
79 }
80
81 /// @name MCStreamer Interface
82 /// @{
83
84 void changeSection(MCSection *Sect, uint32_t Subsection = 0) override;
85 void emitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override;
86 void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override;
87 void emitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol) override;
88 void emitSubsectionsViaSymbols() override;
89 void emitLinkerOptions(ArrayRef<std::string> Options) override;
90 void emitDataRegion(MCDataRegionType Kind) override;
91 void emitVersionMin(MCVersionMinType Kind, unsigned Major, unsigned Minor,
92 unsigned Update, VersionTuple SDKVersion) override;
93 void emitBuildVersion(unsigned Platform, unsigned Major, unsigned Minor,
94 unsigned Update, VersionTuple SDKVersion) override;
95 void emitDarwinTargetVariantBuildVersion(unsigned Platform, unsigned Major,
96 unsigned Minor, unsigned Update,
97 VersionTuple SDKVersion) override;
98 void emitTargetTriple(StringRef TargetTriple) override;
99 bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override;
100 void emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override;
101 void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
102 Align ByteAlignment) override;
103
104 void emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
105 Align ByteAlignment) override;
106 void emitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr,
107 uint64_t Size = 0, Align ByteAlignment = Align(1),
108 SMLoc Loc = SMLoc()) override;
109 void emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size,
110 Align ByteAlignment = Align(1)) override;
111
112 void emitIdent(StringRef IdentString) override {
113 llvm_unreachable("macho doesn't support this directive");
114 }
115
116 void emitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) override {
117 getWriter().getLOHContainer().addDirective(Kind, Args);
118 }
119 void emitCGProfileEntry(const MCSymbolRefExpr *From,
120 const MCSymbolRefExpr *To, uint64_t Count) override {
121 if (!From->getSymbol().isTemporary() && !To->getSymbol().isTemporary())
122 getWriter().getCGProfile().push_back({From, To, Count});
123 }
124
125 void finishImpl() override;
126
127 void finalizeCGProfileEntry(const MCSymbolRefExpr *&SRE);
128 void finalizeCGProfile();
129 void createAddrSigSection();
130};
131
132} // end anonymous namespace.
133
134void MCMachOStreamer::changeSection(MCSection *Section, uint32_t Subsection) {
135 MCObjectStreamer::changeSection(Section, Subsection);
136
137 // Output a linker-local symbol so we don't need section-relative local
138 // relocations. The linker hates us when we do that.
139 if (LabelSections && !HasSectionLabel[Section] &&
140 !Section->getBeginSymbol()) {
141 MCSymbol *Label = getContext().createLinkerPrivateTempSymbol();
142 Section->setBeginSymbol(Label);
143 HasSectionLabel[Section] = true;
144 if (!Label->isInSection())
145 emitLabel(Label);
146 }
147}
148
149void MCMachOStreamer::emitEHSymAttributes(const MCSymbol *Symbol,
150 MCSymbol *EHSymbol) {
151 auto *Sym = static_cast<const MCSymbolMachO *>(Symbol);
152 getAssembler().registerSymbol(*Symbol);
153 if (Sym->isExternal())
154 emitSymbolAttribute(EHSymbol, MCSA_Global);
155 if (Sym->isWeakDefinition())
156 emitSymbolAttribute(EHSymbol, MCSA_WeakDefinition);
157 if (Sym->isPrivateExtern())
158 emitSymbolAttribute(EHSymbol, MCSA_PrivateExtern);
159}
160
161void MCMachOStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
162 // We have to create a new fragment if this is an atom defining symbol,
163 // fragments cannot span atoms.
164 if (static_cast<MCSymbolMachO *>(Symbol)->isSymbolLinkerVisible())
165 newFragment();
166
167 MCObjectStreamer::emitLabel(Symbol, Loc);
168
169 // This causes the reference type flag to be cleared. Darwin 'as' was "trying"
170 // to clear the weak reference and weak definition bits too, but the
171 // implementation was buggy. For now we just try to match 'as', for
172 // diffability.
173 //
174 // FIXME: Cleanup this code, these bits should be emitted based on semantic
175 // properties, not on the order of definition, etc.
176 static_cast<MCSymbolMachO *>(Symbol)->clearReferenceType();
177}
178
179void MCMachOStreamer::emitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
180 MCValue Res;
181
182 if (Value->evaluateAsRelocatable(Res, nullptr)) {
183 if (const auto *SymA = Res.getAddSym()) {
184 if (!Res.getSubSym() &&
185 (SymA->getName().empty() || Res.getConstant() != 0))
186 static_cast<MCSymbolMachO *>(Symbol)->setAltEntry();
187 }
188 }
190}
191
192void MCMachOStreamer::emitDataRegion(MachO::DataRegionType Kind) {
193 // Create a temporary label to mark the start of the data region.
194 MCSymbol *Start = getContext().createTempSymbol();
195 emitLabel(Start);
196 // Record the region for the object writer to use.
197 getWriter().getDataRegions().push_back({Kind, Start, nullptr});
198}
199
200void MCMachOStreamer::emitDataRegionEnd() {
201 auto &Regions = getWriter().getDataRegions();
202 assert(!Regions.empty() && "Mismatched .end_data_region!");
203 auto &Data = Regions.back();
204 assert(!Data.End && "Mismatched .end_data_region!");
205 // Create a temporary label to mark the end of the data region.
206 Data.End = getContext().createTempSymbol();
207 emitLabel(Data.End);
208}
209
210void MCMachOStreamer::emitSubsectionsViaSymbols() {
211 getWriter().setSubsectionsViaSymbols(true);
212}
213
214void MCMachOStreamer::emitLinkerOptions(ArrayRef<std::string> Options) {
215 getWriter().getLinkerOptions().push_back(Options);
216}
217
218void MCMachOStreamer::emitDataRegion(MCDataRegionType Kind) {
219 switch (Kind) {
220 case MCDR_DataRegion:
221 emitDataRegion(MachO::DataRegionType::DICE_KIND_DATA);
222 return;
224 emitDataRegion(MachO::DataRegionType::DICE_KIND_JUMP_TABLE8);
225 return;
227 emitDataRegion(MachO::DataRegionType::DICE_KIND_JUMP_TABLE16);
228 return;
230 emitDataRegion(MachO::DataRegionType::DICE_KIND_JUMP_TABLE32);
231 return;
233 emitDataRegionEnd();
234 return;
235 }
236}
237
238void MCMachOStreamer::emitVersionMin(MCVersionMinType Kind, unsigned Major,
239 unsigned Minor, unsigned Update,
240 VersionTuple SDKVersion) {
241 getWriter().setVersionMin(Kind, Major, Minor, Update, SDKVersion);
242}
243
244void MCMachOStreamer::emitBuildVersion(unsigned Platform, unsigned Major,
245 unsigned Minor, unsigned Update,
246 VersionTuple SDKVersion) {
247 getWriter().setBuildVersion((MachO::PlatformType)Platform, Major, Minor,
248 Update, SDKVersion);
249}
250
251void MCMachOStreamer::emitDarwinTargetVariantBuildVersion(
252 unsigned Platform, unsigned Major, unsigned Minor, unsigned Update,
253 VersionTuple SDKVersion) {
254 getWriter().setTargetVariantBuildVersion((MachO::PlatformType)Platform, Major,
255 Minor, Update, SDKVersion);
256}
257
258void MCMachOStreamer::emitTargetTriple(StringRef TargetTriple) {
259 getWriter().setTargetTriple(TargetTriple);
260}
261
262bool MCMachOStreamer::emitSymbolAttribute(MCSymbol *Sym,
264 auto *Symbol = static_cast<MCSymbolMachO *>(Sym);
265
266 // Indirect symbols are handled differently, to match how 'as' handles
267 // them. This makes writing matching .o files easier.
269 // Note that we intentionally cannot use the symbol data here; this is
270 // important for matching the string table that 'as' generates.
271 getWriter().getIndirectSymbols().push_back(
272 {Symbol, getCurrentSectionOnly()});
273 return true;
274 }
275
276 // Adding a symbol attribute always introduces the symbol, note that an
277 // important side effect of calling registerSymbol here is to register
278 // the symbol with the assembler.
279 getAssembler().registerSymbol(*Symbol);
280
281 // The implementation of symbol attributes is designed to match 'as', but it
282 // leaves much to desired. It doesn't really make sense to arbitrarily add and
283 // remove flags, but 'as' allows this (in particular, see .desc).
284 //
285 // In the future it might be worth trying to make these operations more well
286 // defined.
287 switch (Attribute) {
288 case MCSA_Invalid:
292 case MCSA_ELF_TypeTLS:
296 case MCSA_Extern:
297 case MCSA_Hidden:
299 case MCSA_Internal:
300 case MCSA_Protected:
301 case MCSA_Weak:
302 case MCSA_Local:
303 case MCSA_LGlobal:
304 case MCSA_Exported:
305 case MCSA_Memtag:
306 case MCSA_WeakAntiDep:
307 case MCSA_OSLinkage:
308 case MCSA_XPLinkage:
309 return false;
310
311 case MCSA_Global:
312 Symbol->setExternal(true);
313 // This effectively clears the undefined lazy bit, in Darwin 'as', although
314 // it isn't very consistent because it implements this as part of symbol
315 // lookup.
316 //
317 // FIXME: Cleanup this code, these bits should be emitted based on semantic
318 // properties, not on the order of definition, etc.
319 Symbol->setReferenceTypeUndefinedLazy(false);
320 break;
321
323 // FIXME: This requires -dynamic.
324 Symbol->setNoDeadStrip();
325 if (Symbol->isUndefined())
326 Symbol->setReferenceTypeUndefinedLazy(true);
327 break;
328
329 // Since .reference sets the no dead strip bit, it is equivalent to
330 // .no_dead_strip in practice.
331 case MCSA_Reference:
332 case MCSA_NoDeadStrip:
333 Symbol->setNoDeadStrip();
334 break;
335
337 Symbol->setSymbolResolver();
338 break;
339
340 case MCSA_AltEntry:
341 Symbol->setAltEntry();
342 break;
343
345 Symbol->setExternal(true);
346 Symbol->setPrivateExtern(true);
347 break;
348
350 // FIXME: This requires -dynamic.
351 if (Symbol->isUndefined())
352 Symbol->setWeakReference();
353 break;
354
356 // FIXME: 'as' enforces that this is defined and global. The manual claims
357 // it has to be in a coalesced section, but this isn't enforced.
358 Symbol->setWeakDefinition();
359 break;
360
362 Symbol->setWeakDefinition();
363 Symbol->setWeakReference();
364 break;
365
366 case MCSA_Cold:
367 Symbol->setCold();
368 break;
369 }
370
371 return true;
372}
373
374void MCMachOStreamer::emitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {
375 // Encode the 'desc' value into the lowest implementation defined bits.
376 getAssembler().registerSymbol(*Symbol);
377 static_cast<MCSymbolMachO *>(Symbol)->setDesc(DescValue);
378}
379
380void MCMachOStreamer::emitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
381 Align ByteAlignment) {
382 auto &Sym = static_cast<MCSymbolMachO &>(*Symbol);
383 // FIXME: Darwin 'as' does appear to allow redef of a .comm by itself.
384 assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
385
386 getAssembler().registerSymbol(Sym);
387 Sym.setExternal(true);
388 Sym.setCommon(Size, ByteAlignment);
389}
390
391void MCMachOStreamer::emitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size,
392 Align ByteAlignment) {
393 // '.lcomm' is equivalent to '.zerofill'.
394 return emitZerofill(getContext().getObjectFileInfo()->getDataBSSSection(),
395 Symbol, Size, ByteAlignment);
396}
397
398void MCMachOStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
399 uint64_t Size, Align ByteAlignment,
400 SMLoc Loc) {
401 // On darwin all virtual sections have zerofill type. Disallow the usage of
402 // .zerofill in non-virtual functions. If something similar is needed, use
403 // .space or .zero.
404 if (!Section->isBssSection()) {
405 getContext().reportError(
406 Loc, "The usage of .zerofill is restricted to sections of "
407 "ZEROFILL type. Use .zero or .space instead.");
408 return; // Early returning here shouldn't harm. EmitZeros should work on any
409 // section.
410 }
411
412 pushSection();
413 switchSection(Section);
414
415 // The symbol may not be present, which only creates the section.
416 if (Symbol) {
417 emitValueToAlignment(ByteAlignment, 0, 1, 0);
418 emitLabel(Symbol);
419 emitZeros(Size);
420 }
421 popSection();
422}
423
424// This should always be called with the thread local bss section. Like the
425// .zerofill directive this doesn't actually switch sections on us.
426void MCMachOStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
427 uint64_t Size, Align ByteAlignment) {
428 emitZerofill(Section, Symbol, Size, ByteAlignment);
429}
430
431void MCMachOStreamer::finishImpl() {
432 emitFrames();
433
434 // We have to set the fragment atom associations so we can relax properly for
435 // Mach-O.
436
437 // First, scan the symbol table to build a lookup table from fragments to
438 // defining symbols.
439 DenseMap<const MCFragment *, const MCSymbol *> DefiningSymbolMap;
440 for (const MCSymbol &Symbol : getAssembler().symbols()) {
441 auto &Sym = static_cast<const MCSymbolMachO &>(Symbol);
442 if (Sym.isSymbolLinkerVisible() && Sym.isInSection() && !Sym.isVariable() &&
443 !Sym.isAltEntry()) {
444 // An atom defining symbol should never be internal to a fragment.
445 assert(Symbol.getOffset() == 0 &&
446 "Invalid offset in atom defining symbol!");
447 DefiningSymbolMap[Symbol.getFragment()] = &Symbol;
448 }
449 }
450
451 // Set the fragment atom associations by tracking the last seen atom defining
452 // symbol.
453 for (MCSection &Sec : getAssembler()) {
454 static_cast<MCSectionMachO &>(Sec).allocAtoms();
455 const MCSymbol *CurrentAtom = nullptr;
456 size_t I = 0;
457 for (MCFragment &Frag : Sec) {
458 if (const MCSymbol *Symbol = DefiningSymbolMap.lookup(&Frag))
459 CurrentAtom = Symbol;
460 static_cast<MCSectionMachO &>(Sec).setAtom(I++, CurrentAtom);
461 }
462 }
463
464 finalizeCGProfile();
465
466 createAddrSigSection();
468}
469
470void MCMachOStreamer::finalizeCGProfileEntry(const MCSymbolRefExpr *&SRE) {
471 auto *S =
472 static_cast<MCSymbolMachO *>(const_cast<MCSymbol *>(&SRE->getSymbol()));
473 if (getAssembler().registerSymbol(*S))
474 S->setExternal(true);
475}
476
477void MCMachOStreamer::finalizeCGProfile() {
478 MCAssembler &Asm = getAssembler();
479 MCObjectWriter &W = getWriter();
480 if (W.getCGProfile().empty())
481 return;
482 for (auto &E : W.getCGProfile()) {
483 finalizeCGProfileEntry(E.From);
484 finalizeCGProfileEntry(E.To);
485 }
486 // We can't write the section out until symbol indices are finalized which
487 // doesn't happen until after section layout. We need to create the section
488 // and set its size now so that it's accounted for in layout.
489 MCSection *CGProfileSection = Asm.getContext().getMachOSection(
490 "__LLVM", "__cg_profile", 0, SectionKind::getMetadata());
491 // Call the base class changeSection to omit the linker-local label.
492 MCObjectStreamer::changeSection(CGProfileSection);
493 // For each entry, reserve space for 2 32-bit indices and a 64-bit count.
494 size_t SectionBytes =
495 W.getCGProfile().size() * (2 * sizeof(uint32_t) + sizeof(uint64_t));
496 (*CGProfileSection->begin())
497 .setVarContents(std::vector<char>(SectionBytes, 0));
498}
499
501 std::unique_ptr<MCAsmBackend> &&MAB,
502 std::unique_ptr<MCObjectWriter> &&OW,
503 std::unique_ptr<MCCodeEmitter> &&CE,
504 bool DWARFMustBeAtTheEnd,
505 bool LabelSections) {
506 return new MCMachOStreamer(Context, std::move(MAB), std::move(OW),
507 std::move(CE), LabelSections);
508}
509
510// The AddrSig section uses a series of relocations to refer to the symbols that
511// should be considered address-significant. The only interesting content of
512// these relocations is their symbol; the type, length etc will be ignored by
513// the linker. The reason we are not referring to the symbol indices directly is
514// that those indices will be invalidated by tools that update the symbol table.
515// Symbol relocations OTOH will have their indices updated by e.g. llvm-strip.
516void MCMachOStreamer::createAddrSigSection() {
517 MCAssembler &Asm = getAssembler();
518 MCObjectWriter &writer = Asm.getWriter();
519 if (!writer.getEmitAddrsigSection())
520 return;
521 // Create the AddrSig section and first data fragment here as its layout needs
522 // to be computed immediately after in order for it to be exported correctly.
523 MCSection *AddrSigSection =
524 Asm.getContext().getObjectFileInfo()->getAddrSigSection();
525 // Call the base class changeSection to omit the linker-local label.
526 MCObjectStreamer::changeSection(AddrSigSection);
527 auto *Frag = cast<MCFragment>(AddrSigSection->curFragList()->Head);
528 // We will generate a series of pointer-sized symbol relocations at offset
529 // 0x0. Set the section size to be large enough to contain a single pointer
530 // (instead of emitting a zero-sized section) so these relocations are
531 // technically valid, even though we don't expect these relocations to
532 // actually be applied by the linker.
533 constexpr char zero[8] = {};
534 Frag->setVarContents(zero);
535}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
dxil DXContainer Global Emitter
This file defines the DenseMap class.
static void zero(T &Obj)
static LVOptions Options
Definition LVOptions.cpp:25
#define I(x, y, z)
Definition MD5.cpp:57
static bool isSymbolLinkerVisible(const MCSymbol &Symbol)
Func getContext().diagnose(DiagnosticInfoUnsupported(Func
This file defines the SmallVector class.
ValueT lookup(const_arg_type_t< KeyT > Val) const
Return the entry for the specified key, or a default constructed value if no such entry exists.
Definition DenseMap.h:250
Context object for machine code objects.
Definition MCContext.h:83
Instances of this class represent a single low-level machine instruction.
Definition MCInst.h:188
void reset() override
state management
void emitAssignment(MCSymbol *Symbol, const MCExpr *Value) override
Emit an assignment of Value to Symbol.
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
void finishImpl() override
Streamer specific finalization.
void changeSection(MCSection *Section, uint32_t Subsection=0) override
This is called by popSection and switchSection, if the current section changes.
Defines the object file and target independent interfaces used by the assembler backend to write nati...
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition MCSection.h:573
FragList * curFragList() const
Definition MCSection.h:681
iterator begin() const
Definition MCSection.h:682
Streaming machine code generation interface.
Definition MCStreamer.h:222
Generic base class for all target subtargets.
const MCSymbol & getSymbol() const
Definition MCExpr.h:226
void setCommon(uint64_t Size, Align Alignment)
Mark this symbol as being 'common'.
Definition MCSymbol.h:310
bool isInSection() const
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute).
Definition MCSymbol.h:237
bool isVariable() const
isVariable - Check if this is a variable symbol.
Definition MCSymbol.h:267
bool isTemporary() const
isTemporary - Check if this is an assembler temporary symbol.
Definition MCSymbol.h:205
const MCSymbol * getAddSym() const
Definition MCValue.h:49
int64_t getConstant() const
Definition MCValue.h:44
const MCSymbol * getSubSym() const
Definition MCValue.h:51
static SectionKind getMetadata()
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
This is an optimization pass for GlobalISel generic memory operations.
MCDataRegionType
@ MCDR_DataRegionEnd
.end_data_region
@ MCDR_DataRegion
.data_region
@ MCDR_DataRegionJT8
.data_region jt8
@ MCDR_DataRegionJT32
.data_region jt32
@ MCDR_DataRegionJT16
.data_region jt16
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Value
Definition InstrProf.h:143
LLVM_ABI MCStreamer * createMachOStreamer(MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool DWARFMustBeAtTheEnd, bool LabelSections=false)
MCLOHDirective::LOHArgs MCLOHArgs
MCVersionMinType
MCLOHType
Linker Optimization Hint Type.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count
Definition InstrProf.h:145
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1917
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:559
@ MCSA_Local
.local (ELF)
@ MCSA_WeakDefAutoPrivate
.weak_def_can_be_hidden (MachO)
@ MCSA_Memtag
.memtag (ELF)
@ MCSA_Protected
.protected (ELF)
@ MCSA_OSLinkage
symbol uses OS linkage (GOFF)
@ MCSA_Exported
.globl _foo, exported (XCOFF)
@ MCSA_PrivateExtern
.private_extern (MachO)
@ MCSA_Internal
.internal (ELF)
@ MCSA_WeakReference
.weak_reference (MachO)
@ MCSA_AltEntry
.alt_entry (MachO)
@ MCSA_ELF_TypeIndFunction
.type _foo, STT_GNU_IFUNC
@ MCSA_LazyReference
.lazy_reference (MachO)
@ MCSA_ELF_TypeNoType
.type _foo, STT_NOTYPE # aka @notype
@ MCSA_Reference
.reference (MachO)
@ MCSA_SymbolResolver
.symbol_resolver (MachO)
@ MCSA_Weak
.weak
@ MCSA_ELF_TypeTLS
.type _foo, STT_TLS # aka @tls_object
@ MCSA_IndirectSymbol
.indirect_symbol (MachO)
@ MCSA_WeakDefinition
.weak_definition (MachO)
@ MCSA_ELF_TypeCommon
.type _foo, STT_COMMON # aka @common
@ MCSA_Global
.type _foo, @gnu_unique_object
@ MCSA_WeakAntiDep
.weak_anti_dep (COFF)
@ MCSA_XPLinkage
symbol uses XP linkage (GOFF)
@ MCSA_Extern
.extern (XCOFF)
@ MCSA_Cold
.cold (MachO)
@ MCSA_ELF_TypeObject
.type _foo, STT_OBJECT # aka @object
@ MCSA_ELF_TypeGnuUniqueObject
@ MCSA_ELF_TypeFunction
.type _foo, STT_FUNC # aka @function
@ MCSA_Hidden
.hidden (ELF)
@ MCSA_LGlobal
.lglobl (XCOFF)
@ MCSA_Invalid
Not a valid directive.
@ MCSA_NoDeadStrip
.no_dead_strip (MachO)