LLVM  14.0.0git
MCAsmInfoCOFF.cpp
Go to the documentation of this file.
1 //===- MCAsmInfoCOFF.cpp - COFF asm properties ----------------------------===//
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 // This file defines target asm properties related what form asm statements
10 // should take in general on COFF-based targets
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "llvm/MC/MCAsmInfoCOFF.h"
15 #include "llvm/MC/MCDirectives.h"
16 
17 using namespace llvm;
18 
19 void MCAsmInfoCOFF::anchor() {}
20 
22  // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
23  // alignment.
28  WeakRefDirective = "\t.weak\t";
29  AvoidWeakIfComdat = true;
30 
31  // Doesn't support visibility:
34 
35  // Set up DWARF directives
38 
39  // At least MSVC inline-asm does AShr.
40  UseLogicalShr = false;
41 
42  // If this is a COFF target, assume that it supports associative comdats. It's
43  // part of the spec.
45 
46  // We can generate constants in comdat sections that can be shared,
47  // but in order not to create null typed symbols, we actually need to
48  // make them global symbols as well.
50 }
51 
52 void MCAsmInfoMicrosoft::anchor() {}
53 
55 
56 void MCAsmInfoGNUCOFF::anchor() {}
57 
59  // If this is a GNU environment (mingw or cygwin), don't use associative
60  // comdats for jump tables, unwind information, and other data associated with
61  // a function.
63 
64  // We don't create constants in comdat sections for MinGW.
65  HasCOFFComdatConstants = false;
66 }
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
MCDirectives.h
llvm::MCSA_Invalid
@ MCSA_Invalid
Not a valid directive.
Definition: MCDirectives.h:19
llvm::MCAsmInfoMicrosoft::MCAsmInfoMicrosoft
MCAsmInfoMicrosoft()
llvm::MCAsmInfo::AvoidWeakIfComdat
bool AvoidWeakIfComdat
True if we should mark symbols as global instead of weak, for weak*‍/linkonce*, if the symbol has a c...
Definition: MCAsmInfo.h:427
llvm::MCAsmInfo::SupportsDebugInformation
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:445
llvm::MCAsmInfo::ProtectedVisibilityAttr
MCSymbolAttr ProtectedVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having protected visibility.
Definition: MCAsmInfo.h:439
llvm::MCAsmInfo::HasSingleParameterDotFile
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:391
llvm::MCAsmInfoCOFF::MCAsmInfoCOFF
MCAsmInfoCOFF()
Definition: MCAsmInfoCOFF.cpp:21
llvm::MCAsmInfo::HasDotTypeDotSizeDirective
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:387
llvm::MCAsmInfo::WeakRefDirective
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition: MCAsmInfo.h:414
llvm::MCAsmInfo::COMMDirectiveAlignmentIsInBytes
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n).
Definition: MCAsmInfo.h:365
llvm::MCAsmInfo::HiddenDeclarationVisibilityAttr
MCSymbolAttr HiddenDeclarationVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare an undefined symbol as having hidden visibili...
Definition: MCAsmInfo.h:435
MCAsmInfoCOFF.h
llvm::MCAsmInfo::HasCOFFComdatConstants
bool HasCOFFComdatConstants
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:103
llvm::LCOMM::ByteAlignment
@ ByteAlignment
Definition: MCAsmInfo.h:50
llvm::MCAsmInfo::HasCOFFAssociativeComdats
bool HasCOFFAssociativeComdats
True if this is a non-GNU COFF target.
Definition: MCAsmInfo.h:99
llvm::MCAsmInfo::UseLogicalShr
bool UseLogicalShr
True if the integrated assembler should interpret 'a >> b' constant expressions as logical rather tha...
Definition: MCAsmInfo.h:515
llvm::MCAsmInfo::HiddenVisibilityAttr
MCSymbolAttr HiddenVisibilityAttr
This attribute, if not MCSA_Invalid, is used to declare a symbol as having hidden visibility.
Definition: MCAsmInfo.h:431
llvm::MCAsmInfo::LCOMMDirectiveAlignmentType
LCOMM::LCOMMType LCOMMDirectiveAlignmentType
Describes if the .lcomm directive for the target supports an alignment argument and how it is interpr...
Definition: MCAsmInfo.h:369
llvm::MCAsmInfo::NeedsDwarfSectionOffsetDirective
bool NeedsDwarfSectionOffsetDirective
Definition: MCAsmInfo.h:321
llvm::MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF
MCAsmInfoGNUCOFF()
Definition: MCAsmInfoCOFF.cpp:58