LLVM  8.0.0svn
MCAssembler.h
Go to the documentation of this file.
1 //===- MCAssembler.h - Object File Generation -------------------*- 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_MCASSEMBLER_H
11 #define LLVM_MC_MCASSEMBLER_H
12 
13 #include "llvm/ADT/ArrayRef.h"
14 #include "llvm/ADT/STLExtras.h"
15 #include "llvm/ADT/SmallPtrSet.h"
16 #include "llvm/ADT/StringRef.h"
17 #include "llvm/ADT/iterator.h"
20 #include "llvm/MC/MCDirectives.h"
21 #include "llvm/MC/MCDwarf.h"
22 #include "llvm/MC/MCFixup.h"
23 #include "llvm/MC/MCFragment.h"
25 #include "llvm/MC/MCSymbol.h"
26 #include <cassert>
27 #include <cstddef>
28 #include <cstdint>
29 #include <string>
30 #include <utility>
31 #include <vector>
32 
33 namespace llvm {
34 
35 class MCAsmBackend;
36 class MCAsmLayout;
37 class MCContext;
38 class MCCodeEmitter;
39 class MCFragment;
40 class MCObjectWriter;
41 class MCSection;
42 class MCValue;
43 
44 // FIXME: This really doesn't belong here. See comments below.
48 };
49 
50 // FIXME: Ditto this. Purely so the Streamer and the ObjectWriter can talk
51 // to one another.
53  // This enum should be kept in sync w/ the mach-o definition in
54  // llvm/Object/MachOFormat.h.
55  enum KindTy { Data = 1, JumpTable8, JumpTable16, JumpTable32 } Kind;
58 };
59 
60 class MCAssembler {
61  friend class MCAsmLayout;
62 
63 public:
64  using SectionListType = std::vector<MCSection *>;
65  using SymbolDataListType = std::vector<const MCSymbol *>;
66 
69 
70  using const_symbol_iterator =
73 
76 
78  std::vector<IndirectSymbolData>::const_iterator;
79  using indirect_symbol_iterator = std::vector<IndirectSymbolData>::iterator;
80 
82  std::vector<DataRegionData>::const_iterator;
83  using data_region_iterator = std::vector<DataRegionData>::iterator;
84 
85  /// MachO specific deployment target version info.
86  // A Major version of 0 indicates that no version information was supplied
87  // and so the corresponding load command should not be emitted.
88  using VersionInfoType = struct {
89  bool EmitBuildVersion;
90  union {
91  MCVersionMinType Type; ///< Used when EmitBuildVersion==false.
92  MachO::PlatformType Platform; ///< Used when EmitBuildVersion==true.
93  } TypeOrPlatform;
94  unsigned Major;
95  unsigned Minor;
96  unsigned Update;
97  };
98 
99 private:
101 
102  std::unique_ptr<MCAsmBackend> Backend;
103 
104  std::unique_ptr<MCCodeEmitter> Emitter;
105 
106  std::unique_ptr<MCObjectWriter> Writer;
107 
108  SectionListType Sections;
109 
110  SymbolDataListType Symbols;
111 
112  std::vector<IndirectSymbolData> IndirectSymbols;
113 
114  std::vector<DataRegionData> DataRegions;
115 
116  /// The list of linker options to propagate into the object file.
117  std::vector<std::vector<std::string>> LinkerOptions;
118 
119  /// List of declared file names
120  std::vector<std::string> FileNames;
121 
122  MCDwarfLineTableParams LTParams;
123 
124  /// The set of function symbols for which a .thumb_func directive has
125  /// been seen.
126  //
127  // FIXME: We really would like this in target specific code rather than
128  // here. Maybe when the relocation stuff moves to target specific,
129  // this can go with it? The streamer would need some target specific
130  // refactoring too.
131  mutable SmallPtrSet<const MCSymbol *, 32> ThumbFuncs;
132 
133  /// The bundle alignment size currently set in the assembler.
134  ///
135  /// By default it's 0, which means bundling is disabled.
136  unsigned BundleAlignSize;
137 
138  bool RelaxAll : 1;
139  bool SubsectionsViaSymbols : 1;
140  bool IncrementalLinkerCompatible : 1;
141 
142  /// ELF specific e_header flags
143  // It would be good if there were an MCELFAssembler class to hold this.
144  // ELF header flags are used both by the integrated and standalone assemblers.
145  // Access to the flags is necessary in cases where assembler directives affect
146  // which flags to be set.
147  unsigned ELFHeaderEFlags;
148 
149  /// Used to communicate Linker Optimization Hint information between
150  /// the Streamer and the .o writer
151  MCLOHContainer LOHContainer;
152 
153  VersionInfoType VersionInfo;
154 
155  /// Evaluate a fixup to a relocatable expression and the value which should be
156  /// placed into the fixup.
157  ///
158  /// \param Layout The layout to use for evaluation.
159  /// \param Fixup The fixup to evaluate.
160  /// \param DF The fragment the fixup is inside.
161  /// \param Target [out] On return, the relocatable expression the fixup
162  /// evaluates to.
163  /// \param Value [out] On return, the value of the fixup as currently laid
164  /// out.
165  /// \param WasForced [out] On return, the value in the fixup is set to the
166  /// correct value if WasForced is true, even if evaluateFixup returns false.
167  /// \return Whether the fixup value was fully resolved. This is true if the
168  /// \p Value result is fixed, otherwise the value may change due to
169  /// relocation.
170  bool evaluateFixup(const MCAsmLayout &Layout, const MCFixup &Fixup,
171  const MCFragment *DF, MCValue &Target,
172  uint64_t &Value, bool &WasForced) const;
173 
174  /// Check whether a fixup can be satisfied, or whether it needs to be relaxed
175  /// (increased in size, in order to hold its value correctly).
176  bool fixupNeedsRelaxation(const MCFixup &Fixup, const MCRelaxableFragment *DF,
177  const MCAsmLayout &Layout) const;
178 
179  /// Check whether the given fragment needs relaxation.
180  bool fragmentNeedsRelaxation(const MCRelaxableFragment *IF,
181  const MCAsmLayout &Layout) const;
182 
183  /// Perform one layout iteration and return true if any offsets
184  /// were adjusted.
185  bool layoutOnce(MCAsmLayout &Layout);
186 
187  /// Perform one layout iteration of the given section and return true
188  /// if any offsets were adjusted.
189  bool layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec);
190 
191  bool relaxInstruction(MCAsmLayout &Layout, MCRelaxableFragment &IF);
192 
193  bool relaxPaddingFragment(MCAsmLayout &Layout, MCPaddingFragment &PF);
194 
195  bool relaxLEB(MCAsmLayout &Layout, MCLEBFragment &IF);
196 
197  bool relaxDwarfLineAddr(MCAsmLayout &Layout, MCDwarfLineAddrFragment &DF);
198  bool relaxDwarfCallFrameFragment(MCAsmLayout &Layout,
200  bool relaxCVInlineLineTable(MCAsmLayout &Layout,
202  bool relaxCVDefRange(MCAsmLayout &Layout, MCCVDefRangeFragment &DF);
203 
204  /// finishLayout - Finalize a layout, including fragment lowering.
205  void finishLayout(MCAsmLayout &Layout);
206 
207  std::tuple<MCValue, uint64_t, bool>
208  handleFixup(const MCAsmLayout &Layout, MCFragment &F, const MCFixup &Fixup);
209 
210 public:
211  std::vector<std::pair<StringRef, const MCSymbol *>> Symvers;
212 
213  /// Construct a new assembler instance.
214  //
215  // FIXME: How are we going to parameterize this? Two obvious options are stay
216  // concrete and require clients to pass in a target like object. The other
217  // option is to make this abstract, and have targets provide concrete
218  // implementations as we do with AsmParser.
219  MCAssembler(MCContext &Context, std::unique_ptr<MCAsmBackend> Backend,
220  std::unique_ptr<MCCodeEmitter> Emitter,
221  std::unique_ptr<MCObjectWriter> Writer);
222  MCAssembler(const MCAssembler &) = delete;
223  MCAssembler &operator=(const MCAssembler &) = delete;
224  ~MCAssembler();
225 
226  /// Compute the effective fragment size assuming it is laid out at the given
227  /// \p SectionAddress and \p FragmentOffset.
228  uint64_t computeFragmentSize(const MCAsmLayout &Layout,
229  const MCFragment &F) const;
230 
231  /// Find the symbol which defines the atom containing the given symbol, or
232  /// null if there is no such symbol.
233  const MCSymbol *getAtom(const MCSymbol &S) const;
234 
235  /// Check whether a particular symbol is visible to the linker and is required
236  /// in the symbol table, or whether it can be discarded by the assembler. This
237  /// also effects whether the assembler treats the label as potentially
238  /// defining a separate atom.
239  bool isSymbolLinkerVisible(const MCSymbol &SD) const;
240 
241  /// Emit the section contents to \p OS.
242  void writeSectionData(raw_ostream &OS, const MCSection *Section,
243  const MCAsmLayout &Layout) const;
244 
245  /// Check whether a given symbol has been flagged with .thumb_func.
246  bool isThumbFunc(const MCSymbol *Func) const;
247 
248  /// Flag a function symbol as the target of a .thumb_func directive.
249  void setIsThumbFunc(const MCSymbol *Func) { ThumbFuncs.insert(Func); }
250 
251  /// ELF e_header flags
252  unsigned getELFHeaderEFlags() const { return ELFHeaderEFlags; }
253  void setELFHeaderEFlags(unsigned Flags) { ELFHeaderEFlags = Flags; }
254 
255  /// MachO deployment target version information.
256  const VersionInfoType &getVersionInfo() const { return VersionInfo; }
257  void setVersionMin(MCVersionMinType Type, unsigned Major, unsigned Minor,
258  unsigned Update) {
259  VersionInfo.EmitBuildVersion = false;
260  VersionInfo.TypeOrPlatform.Type = Type;
261  VersionInfo.Major = Major;
262  VersionInfo.Minor = Minor;
263  VersionInfo.Update = Update;
264  }
265  void setBuildVersion(MachO::PlatformType Platform, unsigned Major,
266  unsigned Minor, unsigned Update) {
267  VersionInfo.EmitBuildVersion = true;
268  VersionInfo.TypeOrPlatform.Platform = Platform;
269  VersionInfo.Major = Major;
270  VersionInfo.Minor = Minor;
271  VersionInfo.Update = Update;
272  }
273 
274  /// Reuse an assembler instance
275  ///
276  void reset();
277 
278  MCContext &getContext() const { return Context; }
279 
280  MCAsmBackend *getBackendPtr() const { return Backend.get(); }
281 
282  MCCodeEmitter *getEmitterPtr() const { return Emitter.get(); }
283 
284  MCObjectWriter *getWriterPtr() const { return Writer.get(); }
285 
286  MCAsmBackend &getBackend() const { return *Backend; }
287 
288  MCCodeEmitter &getEmitter() const { return *Emitter; }
289 
290  MCObjectWriter &getWriter() const { return *Writer; }
291 
292  MCDwarfLineTableParams getDWARFLinetableParams() const { return LTParams; }
294 
295  /// Finish - Do final processing and write the object to the output stream.
296  /// \p Writer is used for custom object writer (as the MCJIT does),
297  /// if not specified it is automatically created from backend.
298  void Finish();
299 
300  // Layout all section and prepare them for emission.
301  void layout(MCAsmLayout &Layout);
302 
303  // FIXME: This does not belong here.
304  bool getSubsectionsViaSymbols() const { return SubsectionsViaSymbols; }
305  void setSubsectionsViaSymbols(bool Value) { SubsectionsViaSymbols = Value; }
306 
308  return IncrementalLinkerCompatible;
309  }
311  IncrementalLinkerCompatible = Value;
312  }
313 
314  bool getRelaxAll() const { return RelaxAll; }
315  void setRelaxAll(bool Value) { RelaxAll = Value; }
316 
317  bool isBundlingEnabled() const { return BundleAlignSize != 0; }
318 
319  unsigned getBundleAlignSize() const { return BundleAlignSize; }
320 
321  void setBundleAlignSize(unsigned Size) {
322  assert((Size == 0 || !(Size & (Size - 1))) &&
323  "Expect a power-of-two bundle align size");
324  BundleAlignSize = Size;
325  }
326 
327  /// \name Section List Access
328  /// @{
329 
330  iterator begin() { return Sections.begin(); }
331  const_iterator begin() const { return Sections.begin(); }
332 
333  iterator end() { return Sections.end(); }
334  const_iterator end() const { return Sections.end(); }
335 
336  size_t size() const { return Sections.size(); }
337 
338  /// @}
339  /// \name Symbol List Access
340  /// @{
341  symbol_iterator symbol_begin() { return Symbols.begin(); }
342  const_symbol_iterator symbol_begin() const { return Symbols.begin(); }
343 
344  symbol_iterator symbol_end() { return Symbols.end(); }
345  const_symbol_iterator symbol_end() const { return Symbols.end(); }
346 
347  symbol_range symbols() { return make_range(symbol_begin(), symbol_end()); }
349  return make_range(symbol_begin(), symbol_end());
350  }
351 
352  size_t symbol_size() const { return Symbols.size(); }
353 
354  /// @}
355  /// \name Indirect Symbol List Access
356  /// @{
357 
358  // FIXME: This is a total hack, this should not be here. Once things are
359  // factored so that the streamer has direct access to the .o writer, it can
360  // disappear.
361  std::vector<IndirectSymbolData> &getIndirectSymbols() {
362  return IndirectSymbols;
363  }
364 
366  return IndirectSymbols.begin();
367  }
369  return IndirectSymbols.begin();
370  }
371 
373  return IndirectSymbols.end();
374  }
376  return IndirectSymbols.end();
377  }
378 
379  size_t indirect_symbol_size() const { return IndirectSymbols.size(); }
380 
381  /// @}
382  /// \name Linker Option List Access
383  /// @{
384 
385  std::vector<std::vector<std::string>> &getLinkerOptions() {
386  return LinkerOptions;
387  }
388 
389  /// @}
390  /// \name Data Region List Access
391  /// @{
392 
393  // FIXME: This is a total hack, this should not be here. Once things are
394  // factored so that the streamer has direct access to the .o writer, it can
395  // disappear.
396  std::vector<DataRegionData> &getDataRegions() { return DataRegions; }
397 
398  data_region_iterator data_region_begin() { return DataRegions.begin(); }
400  return DataRegions.begin();
401  }
402 
403  data_region_iterator data_region_end() { return DataRegions.end(); }
405  return DataRegions.end();
406  }
407 
408  size_t data_region_size() const { return DataRegions.size(); }
409 
410  /// @}
411  /// \name Data Region List Access
412  /// @{
413 
414  // FIXME: This is a total hack, this should not be here. Once things are
415  // factored so that the streamer has direct access to the .o writer, it can
416  // disappear.
417  MCLOHContainer &getLOHContainer() { return LOHContainer; }
419  return const_cast<MCAssembler *>(this)->getLOHContainer();
420  }
421 
422  struct CGProfileEntry {
425  uint64_t Count;
426  };
427  std::vector<CGProfileEntry> CGProfile;
428  /// @}
429  /// \name Backend Data Access
430  /// @{
431 
432  bool registerSection(MCSection &Section);
433 
434  void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr);
435 
436  ArrayRef<std::string> getFileNames() { return FileNames; }
437 
438  void addFileName(StringRef FileName) {
439  if (!is_contained(FileNames, FileName))
440  FileNames.push_back(FileName);
441  }
442 
443  /// Write the necessary bundle padding to \p OS.
444  /// Expects a fragment \p F containing instructions and its size \p FSize.
445  void writeFragmentPadding(raw_ostream &OS, const MCEncodedFragment &F,
446  uint64_t FSize) const;
447 
448  /// @}
449 
450  void dump() const;
451 };
452 
453 /// Compute the amount of padding required before the fragment \p F to
454 /// obey bundling restrictions, where \p FOffset is the fragment's offset in
455 /// its section and \p FSize is the fragment's size.
456 uint64_t computeBundlePadding(const MCAssembler &Assembler,
457  const MCEncodedFragment *F, uint64_t FOffset,
458  uint64_t FSize);
459 
460 } // end namespace llvm
461 
462 #endif // LLVM_MC_MCASSEMBLER_H
void setIsThumbFunc(const MCSymbol *Func)
Flag a function symbol as the target of a .thumb_func directive.
Definition: MCAssembler.h:249
void setELFHeaderEFlags(unsigned Flags)
Definition: MCAssembler.h:253
Instances of this class represent a uniqued identifier for a section in the current translation unit...
Definition: MCSection.h:39
Fragment for adding required padding.
Definition: MCFragment.h:341
LLVMContext & Context
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
MCObjectWriter * getWriterPtr() const
Definition: MCAssembler.h:284
This represents an "assembler immediate".
Definition: MCValue.h:40
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:42
iterator begin()
Definition: MCAssembler.h:330
const_symbol_iterator symbol_end() const
Definition: MCAssembler.h:345
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
size_t symbol_size() const
Definition: MCAssembler.h:352
F(f)
std::vector< IndirectSymbolData > & getIndirectSymbols()
Definition: MCAssembler.h:361
const_data_region_iterator data_region_begin() const
Definition: MCAssembler.h:399
const_iterator end() const
Definition: MCAssembler.h:334
bool isBundlingEnabled() const
Definition: MCAssembler.h:317
Defines the object file and target independent interfaces used by the assembler backend to write nati...
symbol_iterator symbol_begin()
Definition: MCAssembler.h:341
std::vector< DataRegionData >::iterator data_region_iterator
Definition: MCAssembler.h:83
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Definition: MCFixup.h:74
unsigned getBundleAlignSize() const
Definition: MCAssembler.h:319
const_indirect_symbol_iterator indirect_symbol_end() const
Definition: MCAssembler.h:375
MCContext & getContext() const
Definition: MCAssembler.h:278
void setVersionMin(MCVersionMinType Type, unsigned Major, unsigned Minor, unsigned Update)
Definition: MCAssembler.h:257
Interface implemented by fragments that contain encoded instructions and/or data. ...
Definition: MCFragment.h:128
MCDwarfLineTableParams getDWARFLinetableParams() const
Definition: MCAssembler.h:292
Encapsulates the layout of an assembly file at a particular point in time.
Definition: MCAsmLayout.h:29
MCCodeEmitter & getEmitter() const
Definition: MCAssembler.h:288
void setRelaxAll(bool Value)
Definition: MCAssembler.h:315
const MCSymbolRefExpr * From
Definition: MCAssembler.h:423
Represent a reference to a symbol from inside an expression.
Definition: MCExpr.h:166
const MCLOHContainer & getLOHContainer() const
Definition: MCAssembler.h:418
MCObjectWriter & getWriter() const
Definition: MCAssembler.h:290
void setSubsectionsViaSymbols(bool Value)
Definition: MCAssembler.h:305
PlatformType
Definition: MachO.h:484
MCVersionMinType Type
Used when EmitBuildVersion==false.
Definition: MCAssembler.h:91
ArrayRef< std::string > getFileNames()
Definition: MCAssembler.h:436
Context object for machine code objects.
Definition: MCContext.h:63
void setDWARFLinetableParams(MCDwarfLineTableParams P)
Definition: MCAssembler.h:293
const_symbol_iterator symbol_begin() const
Definition: MCAssembler.h:342
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
void setBundleAlignSize(unsigned Size)
Definition: MCAssembler.h:321
const MCSymbolRefExpr * To
Definition: MCAssembler.h:424
const VersionInfoType & getVersionInfo() const
MachO deployment target version information.
Definition: MCAssembler.h:256
iterator end()
Definition: MCAssembler.h:333
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
Definition: MCFragment.h:271
#define P(N)
void setBuildVersion(MachO::PlatformType Platform, unsigned Major, unsigned Minor, unsigned Update)
Definition: MCAssembler.h:265
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
MCCodeEmitter - Generic instruction encoding interface.
Definition: MCCodeEmitter.h:22
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
Definition: SmallPtrSet.h:371
struct { bool EmitBuildVersion VersionInfoType
MachO specific deployment target version info.
Definition: MCAssembler.h:89
MachO::PlatformType Platform
Used when EmitBuildVersion==true.
Definition: MCAssembler.h:92
std::vector< DataRegionData >::const_iterator const_data_region_iterator
Definition: MCAssembler.h:82
std::vector< IndirectSymbolData >::const_iterator const_indirect_symbol_iterator
Definition: MCAssembler.h:78
data_region_iterator data_region_begin()
Definition: MCAssembler.h:398
unsigned getELFHeaderEFlags() const
ELF e_header flags.
Definition: MCAssembler.h:252
std::vector< const MCSymbol * > SymbolDataListType
Definition: MCAssembler.h:65
Fragment representing the .cv_def_range directive.
Definition: MCFragment.h:636
size_t data_region_size() const
Definition: MCAssembler.h:408
static bool isThumbFunc(symbol_iterator Symbol, const ObjectFile &Obj, section_iterator Section)
const_indirect_symbol_iterator indirect_symbol_begin() const
Definition: MCAssembler.h:368
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
std::vector< std::vector< std::string > > & getLinkerOptions()
Definition: MCAssembler.h:385
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
Definition: SmallPtrSet.h:418
indirect_symbol_iterator indirect_symbol_begin()
Definition: MCAssembler.h:365
MCAsmBackend * getBackendPtr() const
Definition: MCAssembler.h:280
void setIncrementalLinkerCompatible(bool Value)
Definition: MCAssembler.h:310
MCAsmBackend & getBackend() const
Definition: MCAssembler.h:286
An iterator type that allows iterating over the pointees via some other iterator. ...
Definition: iterator.h:289
bool getSubsectionsViaSymbols() const
Definition: MCAssembler.h:304
size_t indirect_symbol_size() const
Definition: MCAssembler.h:379
MCLOHContainer & getLOHContainer()
Definition: MCAssembler.h:417
void addFileName(StringRef FileName)
Definition: MCAssembler.h:438
uint64_t computeBundlePadding(const MCAssembler &Assembler, const MCEncodedFragment *F, uint64_t FOffset, uint64_t FSize)
Compute the amount of padding required before the fragment F to obey bundling restrictions, where FOffset is the fragment&#39;s offset in its section and FSize is the fragment&#39;s size.
Definition: MCFragment.cpp:191
bool getRelaxAll() const
Definition: MCAssembler.h:314
A range adaptor for a pair of iterators.
Target - Wrapper for Target specific information.
const_iterator begin() const
Definition: MCAssembler.h:331
Fragment representing the binary annotations produced by the .cv_inline_linetable directive...
Definition: MCFragment.h:598
std::vector< CGProfileEntry > CGProfile
Definition: MCAssembler.h:427
const_data_region_iterator data_region_end() const
Definition: MCAssembler.h:404
uint32_t Size
Definition: Profile.cpp:47
symbol_range symbols()
Definition: MCAssembler.h:347
data_region_iterator data_region_end()
Definition: MCAssembler.h:403
size_t size() const
Definition: MCAssembler.h:336
std::vector< IndirectSymbolData >::iterator indirect_symbol_iterator
Definition: MCAssembler.h:79
const unsigned Kind
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isIncrementalLinkerCompatible() const
Definition: MCAssembler.h:307
MCVersionMinType
Definition: MCDirectives.h:64
LLVM Value Representation.
Definition: Value.h:73
Generic interface to target specific assembler backends.
Definition: MCAsmBackend.h:42
indirect_symbol_iterator indirect_symbol_end()
Definition: MCAssembler.h:372
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
const_symbol_range symbols() const
Definition: MCAssembler.h:348
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
std::vector< DataRegionData > & getDataRegions()
Definition: MCAssembler.h:396
std::vector< MCSection * > SectionListType
Definition: MCAssembler.h:64
std::vector< std::pair< StringRef, const MCSymbol * > > Symvers
Definition: MCAssembler.h:211
MCCodeEmitter * getEmitterPtr() const
Definition: MCAssembler.h:282
symbol_iterator symbol_end()
Definition: MCAssembler.h:344
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Definition: STLExtras.h:1101