Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/MC/MCAsmInfoCOFF.cpp
Line
Count
Source (jump to first uncovered line)
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
0
void MCAsmInfoCOFF::anchor() {}
20
21
2.25k
MCAsmInfoCOFF::MCAsmInfoCOFF() {
22
2.25k
  // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
23
2.25k
  // alignment.
24
2.25k
  COMMDirectiveAlignmentIsInBytes = false;
25
2.25k
  LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
26
2.25k
  HasDotTypeDotSizeDirective = false;
27
2.25k
  HasSingleParameterDotFile = true;
28
2.25k
  WeakRefDirective = "\t.weak\t";
29
2.25k
  HasLinkOnceDirective = true;
30
2.25k
31
2.25k
  // Doesn't support visibility:
32
2.25k
  HiddenVisibilityAttr = HiddenDeclarationVisibilityAttr = MCSA_Invalid;
33
2.25k
  ProtectedVisibilityAttr = MCSA_Invalid;
34
2.25k
35
2.25k
  // Set up DWARF directives
36
2.25k
  SupportsDebugInformation = true;
37
2.25k
  NeedsDwarfSectionOffsetDirective = true;
38
2.25k
39
2.25k
  UseIntegratedAssembler = true;
40
2.25k
41
2.25k
  // At least MSVC inline-asm does AShr.
42
2.25k
  UseLogicalShr = false;
43
2.25k
44
2.25k
  // If this is a COFF target, assume that it supports associative comdats. It's
45
2.25k
  // part of the spec.
46
2.25k
  HasCOFFAssociativeComdats = true;
47
2.25k
48
2.25k
  // We can generate constants in comdat sections that can be shared,
49
2.25k
  // but in order not to create null typed symbols, we actually need to
50
2.25k
  // make them global symbols as well.
51
2.25k
  HasCOFFComdatConstants = true;
52
2.25k
}
53
54
0
void MCAsmInfoMicrosoft::anchor() {}
55
56
1.85k
MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() = default;
57
58
0
void MCAsmInfoGNUCOFF::anchor() {}
59
60
401
MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() {
61
401
  // If this is a GNU environment (mingw or cygwin), don't use associative
62
401
  // comdats for jump tables, unwind information, and other data associated with
63
401
  // a function.
64
401
  HasCOFFAssociativeComdats = false;
65
401
66
401
  // We don't create constants in comdat sections for MinGW.
67
401
  HasCOFFComdatConstants = false;
68
401
}