LLVM API Documentation

MCAsmInfo.h
Go to the documentation of this file.
00001 //===-- llvm/MC/MCAsmInfo.h - Asm info --------------------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file contains a class to be used as the basis for target specific
00011 // asm writers.  This class primarily takes care of global printing constants,
00012 // which are used in very similar ways across all targets.
00013 //
00014 //===----------------------------------------------------------------------===//
00015 
00016 #ifndef LLVM_TARGET_ASM_INFO_H
00017 #define LLVM_TARGET_ASM_INFO_H
00018 
00019 #include "llvm/MC/MachineLocation.h"
00020 #include "llvm/MC/MCDirectives.h"
00021 #include <cassert>
00022 #include <vector>
00023 
00024 namespace llvm {
00025   class MCExpr;
00026   class MCSection;
00027   class MCStreamer;
00028   class MCSymbol;
00029   class MCContext;
00030 
00031   namespace ExceptionHandling {
00032     enum ExceptionsType { None, DwarfCFI, SjLj, ARM, Win64 };
00033   }
00034 
00035   namespace LCOMM {
00036     enum LCOMMType { None, NoAlignment, ByteAlignment };
00037   }
00038 
00039   /// MCAsmInfo - This class is intended to be used as a base class for asm
00040   /// properties and features specific to the target.
00041   class MCAsmInfo {
00042   protected:
00043     //===------------------------------------------------------------------===//
00044     // Properties to be set by the target writer, used to configure asm printer.
00045     //
00046 
00047     /// PointerSize - Pointer size in bytes.
00048     ///               Default is 4.
00049     unsigned PointerSize;
00050 
00051     /// IsLittleEndian - True if target is little endian.
00052     ///                  Default is true.
00053     bool IsLittleEndian;
00054 
00055     /// StackGrowsUp - True if target stack grow up.
00056     ///                Default is false.
00057     bool StackGrowsUp;
00058 
00059     /// HasSubsectionsViaSymbols - True if this target has the MachO
00060     /// .subsections_via_symbols directive.
00061     bool HasSubsectionsViaSymbols;           // Default is false.
00062 
00063     /// HasMachoZeroFillDirective - True if this is a MachO target that supports
00064     /// the macho-specific .zerofill directive for emitting BSS Symbols.
00065     bool HasMachoZeroFillDirective;               // Default is false.
00066 
00067     /// HasMachoTBSSDirective - True if this is a MachO target that supports
00068     /// the macho-specific .tbss directive for emitting thread local BSS Symbols
00069     bool HasMachoTBSSDirective;                 // Default is false.
00070 
00071     /// HasStaticCtorDtorReferenceInStaticMode - True if the compiler should
00072     /// emit a ".reference .constructors_used" or ".reference .destructors_used"
00073     /// directive after the a static ctor/dtor list.  This directive is only
00074     /// emitted in Static relocation model.
00075     bool HasStaticCtorDtorReferenceInStaticMode;  // Default is false.
00076 
00077     /// LinkerRequiresNonEmptyDwarfLines - True if the linker has a bug and
00078     /// requires that the debug_line section be of a minimum size. In practice
00079     /// such a linker requires a non empty line sequence if a file is present.
00080     bool LinkerRequiresNonEmptyDwarfLines; // Default to false.
00081 
00082     /// MaxInstLength - This is the maximum possible length of an instruction,
00083     /// which is needed to compute the size of an inline asm.
00084     unsigned MaxInstLength;                  // Defaults to 4.
00085 
00086     /// PCSymbol - The symbol used to represent the current PC.  Used in PC
00087     /// relative expressions.
00088     const char *PCSymbol;                    // Defaults to "$".
00089 
00090     /// SeparatorString - This string, if specified, is used to separate
00091     /// instructions from each other when on the same line.
00092     const char *SeparatorString;             // Defaults to ';'
00093 
00094     /// CommentColumn - This indicates the comment num (zero-based) at
00095     /// which asm comments should be printed.
00096     unsigned CommentColumn;                  // Defaults to 40
00097 
00098     /// CommentString - This indicates the comment character used by the
00099     /// assembler.
00100     const char *CommentString;               // Defaults to "#"
00101 
00102     /// LabelSuffix - This is appended to emitted labels.
00103     const char *LabelSuffix;                 // Defaults to ":"
00104 
00105     /// GlobalPrefix - If this is set to a non-empty string, it is prepended
00106     /// onto all global symbols.  This is often used for "_" or ".".
00107     const char *GlobalPrefix;                // Defaults to ""
00108 
00109     /// PrivateGlobalPrefix - This prefix is used for globals like constant
00110     /// pool entries that are completely private to the .s file and should not
00111     /// have names in the .o file.  This is often "." or "L".
00112     const char *PrivateGlobalPrefix;         // Defaults to "."
00113 
00114     /// LinkerPrivateGlobalPrefix - This prefix is used for symbols that should
00115     /// be passed through the assembler but be removed by the linker.  This
00116     /// is "l" on Darwin, currently used for some ObjC metadata.
00117     const char *LinkerPrivateGlobalPrefix;   // Defaults to ""
00118 
00119     /// InlineAsmStart/End - If these are nonempty, they contain a directive to
00120     /// emit before and after an inline assembly statement.
00121     const char *InlineAsmStart;              // Defaults to "#APP\n"
00122     const char *InlineAsmEnd;                // Defaults to "#NO_APP\n"
00123 
00124     /// Code16Directive, Code32Directive, Code64Directive - These are assembly
00125     /// directives that tells the assembler to interpret the following
00126     /// instructions differently.
00127     const char *Code16Directive;             // Defaults to ".code16"
00128     const char *Code32Directive;             // Defaults to ".code32"
00129     const char *Code64Directive;             // Defaults to ".code64"
00130 
00131     /// AssemblerDialect - Which dialect of an assembler variant to use.
00132     unsigned AssemblerDialect;               // Defaults to 0
00133 
00134     /// AllowQuotesInName - This is true if the assembler allows for complex
00135     /// symbol names to be surrounded in quotes.  This defaults to false.
00136     bool AllowQuotesInName;
00137 
00138     /// AllowNameToStartWithDigit - This is true if the assembler allows symbol
00139     /// names to start with a digit (e.g., "0x0021").  This defaults to false.
00140     bool AllowNameToStartWithDigit;
00141 
00142     /// AllowPeriodsInName - This is true if the assembler allows periods in
00143     /// symbol names.  This defaults to true.
00144     bool AllowPeriodsInName;
00145 
00146     /// AllowUTF8 - This is true if the assembler accepts UTF-8 input.
00147     // FIXME: Make this a more general encoding setting?
00148     bool AllowUTF8;
00149 
00150     //===--- Data Emission Directives -------------------------------------===//
00151 
00152     /// ZeroDirective - this should be set to the directive used to get some
00153     /// number of zero bytes emitted to the current section.  Common cases are
00154     /// "\t.zero\t" and "\t.space\t".  If this is set to null, the
00155     /// Data*bitsDirective's will be used to emit zero bytes.
00156     const char *ZeroDirective;               // Defaults to "\t.zero\t"
00157 
00158     /// AsciiDirective - This directive allows emission of an ascii string with
00159     /// the standard C escape characters embedded into it.
00160     const char *AsciiDirective;              // Defaults to "\t.ascii\t"
00161 
00162     /// AscizDirective - If not null, this allows for special handling of
00163     /// zero terminated strings on this target.  This is commonly supported as
00164     /// ".asciz".  If a target doesn't support this, it can be set to null.
00165     const char *AscizDirective;              // Defaults to "\t.asciz\t"
00166 
00167     /// DataDirectives - These directives are used to output some unit of
00168     /// integer data to the current section.  If a data directive is set to
00169     /// null, smaller data directives will be used to emit the large sizes.
00170     const char *Data8bitsDirective;          // Defaults to "\t.byte\t"
00171     const char *Data16bitsDirective;         // Defaults to "\t.short\t"
00172     const char *Data32bitsDirective;         // Defaults to "\t.long\t"
00173     const char *Data64bitsDirective;         // Defaults to "\t.quad\t"
00174 
00175     /// [Data|Code]Begin - These magic labels are used to marked a region as
00176     /// data or code, and are used to provide additional information for
00177     /// correct disassembly on targets that like to mix data and code within
00178     /// a segment.  These labels will be implicitly suffixed by the streamer
00179     /// to give them unique names.
00180     const char *DataBegin;                   // Defaults to "$d."
00181     const char *CodeBegin;                   // Defaults to "$a."
00182     const char *JT8Begin;                    // Defaults to "$a."
00183     const char *JT16Begin;                   // Defaults to "$a."
00184     const char *JT32Begin;                   // Defaults to "$a."
00185     bool SupportsDataRegions;
00186 
00187     /// GPRel64Directive - if non-null, a directive that is used to emit a word
00188     /// which should be relocated as a 64-bit GP-relative offset, e.g. .gpdword
00189     /// on Mips.
00190     const char *GPRel64Directive;            // Defaults to NULL.
00191 
00192     /// GPRel32Directive - if non-null, a directive that is used to emit a word
00193     /// which should be relocated as a 32-bit GP-relative offset, e.g. .gpword
00194     /// on Mips or .gprel32 on Alpha.
00195     const char *GPRel32Directive;            // Defaults to NULL.
00196 
00197     /// getDataASDirective - Return the directive that should be used to emit
00198     /// data of the specified size to the specified numeric address space.
00199     virtual const char *getDataASDirective(unsigned Size, unsigned AS) const {
00200       assert(AS != 0 && "Don't know the directives for default addr space");
00201       return 0;
00202     }
00203 
00204     /// SunStyleELFSectionSwitchSyntax - This is true if this target uses "Sun
00205     /// Style" syntax for section switching ("#alloc,#write" etc) instead of the
00206     /// normal ELF syntax (,"a,w") in .section directives.
00207     bool SunStyleELFSectionSwitchSyntax;     // Defaults to false.
00208 
00209     /// UsesELFSectionDirectiveForBSS - This is true if this target uses ELF
00210     /// '.section' directive before the '.bss' one. It's used for PPC/Linux
00211     /// which doesn't support the '.bss' directive only.
00212     bool UsesELFSectionDirectiveForBSS;      // Defaults to false.
00213 
00214     /// HasMicrosoftFastStdCallMangling - True if this target uses microsoft
00215     /// style mangling for functions with X86_StdCall/X86_FastCall calling
00216     /// convention.
00217     bool HasMicrosoftFastStdCallMangling;    // Defaults to false.
00218 
00219     //===--- Alignment Information ----------------------------------------===//
00220 
00221     /// AlignDirective - The directive used to emit round up to an alignment
00222     /// boundary.
00223     ///
00224     const char *AlignDirective;              // Defaults to "\t.align\t"
00225 
00226     /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
00227     /// emits ".align N" directives, where N is the number of bytes to align to.
00228     /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
00229     /// boundary.
00230     bool AlignmentIsInBytes;                 // Defaults to true
00231 
00232     /// TextAlignFillValue - If non-zero, this is used to fill the executable
00233     /// space created as the result of a alignment directive.
00234     unsigned TextAlignFillValue;             // Defaults to 0
00235 
00236     //===--- Global Variable Emission Directives --------------------------===//
00237 
00238     /// GlobalDirective - This is the directive used to declare a global entity.
00239     ///
00240     const char *GlobalDirective;             // Defaults to NULL.
00241 
00242     /// ExternDirective - This is the directive used to declare external
00243     /// globals.
00244     ///
00245     const char *ExternDirective;             // Defaults to NULL.
00246 
00247     /// HasSetDirective - True if the assembler supports the .set directive.
00248     bool HasSetDirective;                    // Defaults to true.
00249 
00250     /// HasAggressiveSymbolFolding - False if the assembler requires that we use
00251     /// Lc = a - b
00252     /// .long Lc
00253     /// instead of
00254     /// .long a - b
00255     bool HasAggressiveSymbolFolding;           // Defaults to true.
00256 
00257     /// LCOMMDirectiveType - Describes if the target supports the .lcomm
00258     /// directive and whether it has an alignment parameter.
00259     LCOMM::LCOMMType LCOMMDirectiveType;     // Defaults to LCOMM::None.
00260 
00261     /// COMMDirectiveAlignmentIsInBytes - True is COMMDirective's optional
00262     /// alignment is to be specified in bytes instead of log2(n).
00263     bool COMMDirectiveAlignmentIsInBytes;    // Defaults to true;
00264 
00265     /// HasDotTypeDotSizeDirective - True if the target has .type and .size
00266     /// directives, this is true for most ELF targets.
00267     bool HasDotTypeDotSizeDirective;         // Defaults to true.
00268 
00269     /// HasSingleParameterDotFile - True if the target has a single parameter
00270     /// .file directive, this is true for ELF targets.
00271     bool HasSingleParameterDotFile;          // Defaults to true.
00272 
00273     /// HasNoDeadStrip - True if this target supports the MachO .no_dead_strip
00274     /// directive.
00275     bool HasNoDeadStrip;                     // Defaults to false.
00276 
00277     /// HasSymbolResolver - True if this target supports the MachO
00278     /// .symbol_resolver directive.
00279     bool HasSymbolResolver;                     // Defaults to false.
00280 
00281     /// WeakRefDirective - This directive, if non-null, is used to declare a
00282     /// global as being a weak undefined symbol.
00283     const char *WeakRefDirective;            // Defaults to NULL.
00284 
00285     /// WeakDefDirective - This directive, if non-null, is used to declare a
00286     /// global as being a weak defined symbol.
00287     const char *WeakDefDirective;            // Defaults to NULL.
00288 
00289     /// LinkOnceDirective - This directive, if non-null is used to declare a
00290     /// global as being a weak defined symbol.  This is used on cygwin/mingw.
00291     const char *LinkOnceDirective;           // Defaults to NULL.
00292 
00293     /// HiddenVisibilityAttr - This attribute, if not MCSA_Invalid, is used to
00294     /// declare a symbol as having hidden visibility.
00295     MCSymbolAttr HiddenVisibilityAttr;       // Defaults to MCSA_Hidden.
00296 
00297     /// HiddenDeclarationVisibilityAttr - This attribute, if not MCSA_Invalid,
00298     /// is used to declare an undefined symbol as having hidden visibility.
00299     MCSymbolAttr HiddenDeclarationVisibilityAttr;   // Defaults to MCSA_Hidden.
00300 
00301 
00302     /// ProtectedVisibilityAttr - This attribute, if not MCSA_Invalid, is used
00303     /// to declare a symbol as having protected visibility.
00304     MCSymbolAttr ProtectedVisibilityAttr;    // Defaults to MCSA_Protected
00305 
00306     //===--- Dwarf Emission Directives -----------------------------------===//
00307 
00308     /// HasLEB128 - True if target asm supports leb128 directives.
00309     bool HasLEB128;                          // Defaults to false.
00310 
00311     /// SupportsDebugInformation - True if target supports emission of debugging
00312     /// information.
00313     bool SupportsDebugInformation;           // Defaults to false.
00314 
00315     /// SupportsExceptionHandling - True if target supports exception handling.
00316     ExceptionHandling::ExceptionsType ExceptionsType; // Defaults to None
00317 
00318     /// DwarfUsesInlineInfoSection - True if DwarfDebugInlineSection is used to
00319     /// encode inline subroutine information.
00320     bool DwarfUsesInlineInfoSection;         // Defaults to false.
00321 
00322     /// DwarfSectionOffsetDirective - Special section offset directive.
00323     const char* DwarfSectionOffsetDirective; // Defaults to NULL
00324 
00325     /// DwarfRequiresRelocationForSectionOffset - True if we need to produce a
00326     /// relocation when we want a section offset in dwarf.
00327     bool DwarfRequiresRelocationForSectionOffset;  // Defaults to true;
00328 
00329     /// DwarfUsesLabelOffsetDifference - True if Dwarf2 output can
00330     /// use EmitLabelOffsetDifference.
00331     bool DwarfUsesLabelOffsetForRanges;
00332 
00333     /// DwarfUsesRelocationsForStringPool - True if this Dwarf output must use
00334     /// relocations to refer to entries in the string pool.
00335     bool DwarfUsesRelocationsForStringPool;
00336 
00337     /// DwarfRegNumForCFI - True if dwarf register numbers are printed
00338     /// instead of symbolic register names in .cfi_* directives.
00339     bool DwarfRegNumForCFI;  // Defaults to false;
00340 
00341     //===--- Prologue State ----------------------------------------------===//
00342 
00343     std::vector<MachineMove> InitialFrameState;
00344 
00345   public:
00346     explicit MCAsmInfo();
00347     virtual ~MCAsmInfo();
00348 
00349     // FIXME: move these methods to DwarfPrinter when the JIT stops using them.
00350     static unsigned getSLEB128Size(int Value);
00351     static unsigned getULEB128Size(unsigned Value);
00352 
00353     /// getPointerSize - Get the pointer size in bytes.
00354     unsigned getPointerSize() const {
00355       return PointerSize;
00356     }
00357 
00358     /// islittleendian - True if the target is little endian.
00359     bool isLittleEndian() const {
00360       return IsLittleEndian;
00361     }
00362 
00363     /// isStackGrowthDirectionUp - True if target stack grow up.
00364     bool isStackGrowthDirectionUp() const {
00365       return StackGrowsUp;
00366     }
00367 
00368     bool hasSubsectionsViaSymbols() const { return HasSubsectionsViaSymbols; }
00369 
00370     // Data directive accessors.
00371     //
00372     const char *getData8bitsDirective(unsigned AS = 0) const {
00373       return AS == 0 ? Data8bitsDirective : getDataASDirective(8, AS);
00374     }
00375     const char *getData16bitsDirective(unsigned AS = 0) const {
00376       return AS == 0 ? Data16bitsDirective : getDataASDirective(16, AS);
00377     }
00378     const char *getData32bitsDirective(unsigned AS = 0) const {
00379       return AS == 0 ? Data32bitsDirective : getDataASDirective(32, AS);
00380     }
00381     const char *getData64bitsDirective(unsigned AS = 0) const {
00382       return AS == 0 ? Data64bitsDirective : getDataASDirective(64, AS);
00383     }
00384     const char *getGPRel64Directive() const { return GPRel64Directive; }
00385     const char *getGPRel32Directive() const { return GPRel32Directive; }
00386 
00387     /// [Code|Data]Begin label name accessors.
00388     const char *getCodeBeginLabelName() const { return CodeBegin; }
00389     const char *getDataBeginLabelName() const { return DataBegin; }
00390     const char *getJumpTable8BeginLabelName() const { return JT8Begin; }
00391     const char *getJumpTable16BeginLabelName() const { return JT16Begin; }
00392     const char *getJumpTable32BeginLabelName() const { return JT32Begin; }
00393     bool getSupportsDataRegions() const { return SupportsDataRegions; }
00394 
00395     /// getNonexecutableStackSection - Targets can implement this method to
00396     /// specify a section to switch to if the translation unit doesn't have any
00397     /// trampolines that require an executable stack.
00398     virtual const MCSection *getNonexecutableStackSection(MCContext &Ctx) const{
00399       return 0;
00400     }
00401 
00402     virtual const MCExpr *
00403     getExprForPersonalitySymbol(const MCSymbol *Sym,
00404                                 unsigned Encoding,
00405                                 MCStreamer &Streamer) const;
00406 
00407     const MCExpr *
00408     getExprForFDESymbol(const MCSymbol *Sym,
00409                         unsigned Encoding,
00410                         MCStreamer &Streamer) const;
00411 
00412     bool usesSunStyleELFSectionSwitchSyntax() const {
00413       return SunStyleELFSectionSwitchSyntax;
00414     }
00415 
00416     bool usesELFSectionDirectiveForBSS() const {
00417       return UsesELFSectionDirectiveForBSS;
00418     }
00419 
00420     bool hasMicrosoftFastStdCallMangling() const {
00421       return HasMicrosoftFastStdCallMangling;
00422     }
00423 
00424     // Accessors.
00425     //
00426     bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
00427     bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
00428     bool hasStaticCtorDtorReferenceInStaticMode() const {
00429       return HasStaticCtorDtorReferenceInStaticMode;
00430     }
00431     bool getLinkerRequiresNonEmptyDwarfLines() const {
00432       return LinkerRequiresNonEmptyDwarfLines;
00433     }
00434     unsigned getMaxInstLength() const {
00435       return MaxInstLength;
00436     }
00437     const char *getPCSymbol() const {
00438       return PCSymbol;
00439     }
00440     const char *getSeparatorString() const {
00441       return SeparatorString;
00442     }
00443     unsigned getCommentColumn() const {
00444       return CommentColumn;
00445     }
00446     const char *getCommentString() const {
00447       return CommentString;
00448     }
00449     const char *getLabelSuffix() const {
00450       return LabelSuffix;
00451     }
00452     const char *getGlobalPrefix() const {
00453       return GlobalPrefix;
00454     }
00455     const char *getPrivateGlobalPrefix() const {
00456       return PrivateGlobalPrefix;
00457     }
00458     const char *getLinkerPrivateGlobalPrefix() const {
00459       return LinkerPrivateGlobalPrefix;
00460     }
00461     const char *getInlineAsmStart() const {
00462       return InlineAsmStart;
00463     }
00464     const char *getInlineAsmEnd() const {
00465       return InlineAsmEnd;
00466     }
00467     const char *getCode16Directive() const {
00468       return Code16Directive;
00469     }
00470     const char *getCode32Directive() const {
00471       return Code32Directive;
00472     }
00473     const char *getCode64Directive() const {
00474       return Code64Directive;
00475     }
00476     unsigned getAssemblerDialect() const {
00477       return AssemblerDialect;
00478     }
00479     bool doesAllowQuotesInName() const {
00480       return AllowQuotesInName;
00481     }
00482     bool doesAllowNameToStartWithDigit() const {
00483       return AllowNameToStartWithDigit;
00484     }
00485     bool doesAllowPeriodsInName() const {
00486       return AllowPeriodsInName;
00487     }
00488     bool doesAllowUTF8() const {
00489       return AllowUTF8;
00490     }
00491     const char *getZeroDirective() const {
00492       return ZeroDirective;
00493     }
00494     const char *getAsciiDirective() const {
00495       return AsciiDirective;
00496     }
00497     const char *getAscizDirective() const {
00498       return AscizDirective;
00499     }
00500     const char *getAlignDirective() const {
00501       return AlignDirective;
00502     }
00503     bool getAlignmentIsInBytes() const {
00504       return AlignmentIsInBytes;
00505     }
00506     unsigned getTextAlignFillValue() const {
00507       return TextAlignFillValue;
00508     }
00509     const char *getGlobalDirective() const {
00510       return GlobalDirective;
00511     }
00512     const char *getExternDirective() const {
00513       return ExternDirective;
00514     }
00515     bool hasSetDirective() const { return HasSetDirective; }
00516     bool hasAggressiveSymbolFolding() const {
00517       return HasAggressiveSymbolFolding;
00518     }
00519     LCOMM::LCOMMType getLCOMMDirectiveType() const {
00520       return LCOMMDirectiveType;
00521     }
00522     bool hasDotTypeDotSizeDirective() const {return HasDotTypeDotSizeDirective;}
00523     bool getCOMMDirectiveAlignmentIsInBytes() const {
00524       return COMMDirectiveAlignmentIsInBytes;
00525     }
00526     bool hasSingleParameterDotFile() const { return HasSingleParameterDotFile; }
00527     bool hasNoDeadStrip() const { return HasNoDeadStrip; }
00528     bool hasSymbolResolver() const { return HasSymbolResolver; }
00529     const char *getWeakRefDirective() const { return WeakRefDirective; }
00530     const char *getWeakDefDirective() const { return WeakDefDirective; }
00531     const char *getLinkOnceDirective() const { return LinkOnceDirective; }
00532 
00533     MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr;}
00534     MCSymbolAttr getHiddenDeclarationVisibilityAttr() const {
00535       return HiddenDeclarationVisibilityAttr;
00536     }
00537     MCSymbolAttr getProtectedVisibilityAttr() const {
00538       return ProtectedVisibilityAttr;
00539     }
00540     bool hasLEB128() const {
00541       return HasLEB128;
00542     }
00543     bool doesSupportDebugInformation() const {
00544       return SupportsDebugInformation;
00545     }
00546     bool doesSupportExceptionHandling() const {
00547       return ExceptionsType != ExceptionHandling::None;
00548     }
00549     ExceptionHandling::ExceptionsType getExceptionHandlingType() const {
00550       return ExceptionsType;
00551     }
00552     bool isExceptionHandlingDwarf() const {
00553       return
00554         (ExceptionsType == ExceptionHandling::DwarfCFI ||
00555          ExceptionsType == ExceptionHandling::ARM ||
00556          ExceptionsType == ExceptionHandling::Win64);
00557     }
00558     bool doesDwarfUseInlineInfoSection() const {
00559       return DwarfUsesInlineInfoSection;
00560     }
00561     const char *getDwarfSectionOffsetDirective() const {
00562       return DwarfSectionOffsetDirective;
00563     }
00564     bool doesDwarfRequireRelocationForSectionOffset() const {
00565       return DwarfRequiresRelocationForSectionOffset;
00566     }
00567     bool doesDwarfUseLabelOffsetForRanges() const {
00568       return DwarfUsesLabelOffsetForRanges;
00569     }
00570     bool doesDwarfUseRelocationsForStringPool() const {
00571       return DwarfUsesRelocationsForStringPool;
00572     }
00573     bool useDwarfRegNumForCFI() const {
00574       return DwarfRegNumForCFI;
00575     }
00576 
00577     void addInitialFrameState(MCSymbol *label, const MachineLocation &D,
00578                               const MachineLocation &S) {
00579       InitialFrameState.push_back(MachineMove(label, D, S));
00580     }
00581     const std::vector<MachineMove> &getInitialFrameState() const {
00582       return InitialFrameState;
00583     }
00584   };
00585 }
00586 
00587 #endif