LLVM  8.0.1
MCAsmInfoCOFF.cpp
Go to the documentation of this file.
1 //===- MCAsmInfoCOFF.cpp - COFF asm properties ----------------------------===//
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 // This file defines target asm properties related what form asm statements
11 // should take in general on COFF-based targets
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #include "llvm/MC/MCAsmInfoCOFF.h"
16 #include "llvm/MC/MCDirectives.h"
17 
18 using namespace llvm;
19 
20 void MCAsmInfoCOFF::anchor() {}
21 
23  // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
24  // alignment.
29  WeakRefDirective = "\t.weak\t";
30  HasLinkOnceDirective = true;
31 
32  // Doesn't support visibility:
35 
36  // Set up DWARF directives
39 
41 
42  // At least MSVC inline-asm does AShr.
43  UseLogicalShr = false;
44 
45  // If this is a COFF target, assume that it supports associative comdats. It's
46  // part of the spec.
48 
49  // We can generate constants in comdat sections that can be shared,
50  // but in order not to create null typed symbols, we actually need to
51  // make them global symbols as well.
53 }
54 
55 void MCAsmInfoMicrosoft::anchor() {}
56 
58 
59 void MCAsmInfoGNUCOFF::anchor() {}
60 
62  // If this is a GNU environment (mingw or cygwin), don't use associative
63  // comdats for jump tables, unwind information, and other data associated with
64  // a function.
66 
67  // We don't create constants in comdat sections for MinGW.
68  HasCOFFComdatConstants = false;
69 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:283
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:271
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:371
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Not a valid directive.
Definition: MCDirectives.h:20
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:279
bool UseLogicalShr
True if the integrated assembler should interpret 'a >> b' constant expressions as logical rather tha...
Definition: MCAsmInfo.h:381
bool HasCOFFComdatConstants
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:94
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility...
Definition: MCAsmInfo.h:318
bool HasLinkOnceDirective
True if we have a .linkonce directive.
Definition: MCAsmInfo.h:314
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n)...
Definition: MCAsmInfo.h:267
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:332
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition: MCAsmInfo.h:302
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility...
Definition: MCAsmInfo.h:326
bool NeedsDwarfSectionOffsetDirective
Definition: MCAsmInfo.h:223
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:322
bool HasCOFFAssociativeComdats
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:90