[Alignment][NFC] Convert StoreInst to MaybeAlign
[llvm-complete.git] / lib / MC / MCAsmInfoCOFF.cpp
blob9f19d163f57bc5fb8968f16446043d30f1640c87
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
12 //===----------------------------------------------------------------------===//
14 #include "llvm/MC/MCAsmInfoCOFF.h"
15 #include "llvm/MC/MCDirectives.h"
17 using namespace llvm;
19 void MCAsmInfoCOFF::anchor() {}
21 MCAsmInfoCOFF::MCAsmInfoCOFF() {
22 // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
23 // alignment.
24 COMMDirectiveAlignmentIsInBytes = false;
25 LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
26 HasDotTypeDotSizeDirective = false;
27 HasSingleParameterDotFile = true;
28 WeakRefDirective = "\t.weak\t";
29 HasLinkOnceDirective = true;
31 // Doesn't support visibility:
32 HiddenVisibilityAttr = HiddenDeclarationVisibilityAttr = MCSA_Invalid;
33 ProtectedVisibilityAttr = MCSA_Invalid;
35 // Set up DWARF directives
36 SupportsDebugInformation = true;
37 NeedsDwarfSectionOffsetDirective = true;
39 UseIntegratedAssembler = true;
41 // At least MSVC inline-asm does AShr.
42 UseLogicalShr = false;
44 // If this is a COFF target, assume that it supports associative comdats. It's
45 // part of the spec.
46 HasCOFFAssociativeComdats = true;
48 // We can generate constants in comdat sections that can be shared,
49 // but in order not to create null typed symbols, we actually need to
50 // make them global symbols as well.
51 HasCOFFComdatConstants = true;
54 void MCAsmInfoMicrosoft::anchor() {}
56 MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() = default;
58 void MCAsmInfoGNUCOFF::anchor() {}
60 MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() {
61 // If this is a GNU environment (mingw or cygwin), don't use associative
62 // comdats for jump tables, unwind information, and other data associated with
63 // a function.
64 HasCOFFAssociativeComdats = false;
66 // We don't create constants in comdat sections for MinGW.
67 HasCOFFComdatConstants = false;