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