blob: 85104484fd40186e7f293fe3ae995d84ade45654 [file] [log] [blame]
Eugene Zelenkod3a6c892017-02-11 00:27:28 +00001//===- MCAsmInfoCOFF.cpp - COFF asm properties ----------------------------===//
Chris Lattner1814e812009-07-27 16:45:59 +00002//
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
Chris Lattner7b26fce2009-08-22 20:48:53 +000015#include "llvm/MC/MCAsmInfoCOFF.h"
Eugene Zelenkod3a6c892017-02-11 00:27:28 +000016#include "llvm/MC/MCDirectives.h"
17
Chris Lattner1814e812009-07-27 16:45:59 +000018using namespace llvm;
19
Eugene Zelenkod3a6c892017-02-11 00:27:28 +000020void MCAsmInfoCOFF::anchor() {}
David Blaikiea379b1812011-12-20 02:50:00 +000021
Chris Lattner2b4364f2010-01-20 06:34:14 +000022MCAsmInfoCOFF::MCAsmInfoCOFF() {
Benjamin Kramer68b9f052012-09-07 21:08:01 +000023 // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
24 // alignment.
25 COMMDirectiveAlignmentIsInBytes = false;
26 LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
Chris Lattner1814e812009-07-27 16:45:59 +000027 HasDotTypeDotSizeDirective = false;
28 HasSingleParameterDotFile = false;
Chris Lattner1814e812009-07-27 16:45:59 +000029 WeakRefDirective = "\t.weak\t";
Rafael Espindola04867ce2013-12-02 23:04:51 +000030 HasLinkOnceDirective = true;
Jim Grosbachdc1e36e2012-05-11 01:41:30 +000031
Chris Lattner0bfd2792010-01-23 06:53:23 +000032 // Doesn't support visibility:
Eli Friedman64a4bf12011-09-23 00:13:02 +000033 HiddenVisibilityAttr = HiddenDeclarationVisibilityAttr = MCSA_Invalid;
34 ProtectedVisibilityAttr = MCSA_Invalid;
Chris Lattner1814e812009-07-27 16:45:59 +000035
36 // Set up DWARF directives
Chris Lattner1814e812009-07-27 16:45:59 +000037 SupportsDebugInformation = true;
Matt Arsenault034ca0f2013-04-22 22:49:11 +000038 NeedsDwarfSectionOffsetDirective = true;
Daniel Sanders753e1762014-02-13 14:44:26 +000039
40 UseIntegratedAssembler = true;
Ahmed Bougacha19052872015-04-28 01:37:11 +000041
Ahmed Bougacha4a856432015-11-11 00:51:36 +000042 // At least MSVC inline-asm does AShr.
Ahmed Bougacha19052872015-04-28 01:37:11 +000043 UseLogicalShr = false;
Chris Lattner1814e812009-07-27 16:45:59 +000044}
Michael J. Spencerde3a2112011-11-29 18:00:06 +000045
Eugene Zelenkod3a6c892017-02-11 00:27:28 +000046void MCAsmInfoMicrosoft::anchor() {}
David Blaikiea379b1812011-12-20 02:50:00 +000047
Eugene Zelenkod3a6c892017-02-11 00:27:28 +000048MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() = default;
Michael J. Spencerde3a2112011-11-29 18:00:06 +000049
Eugene Zelenkod3a6c892017-02-11 00:27:28 +000050void MCAsmInfoGNUCOFF::anchor() {}
David Blaikiea379b1812011-12-20 02:50:00 +000051
Eugene Zelenkod3a6c892017-02-11 00:27:28 +000052MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() = default;