Coverage Report

Created: 2019-02-21 13:17

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.inc
Line
Count
Source
1
//===-- MCTargetOptionsCommandFlags.h --------------------------*- C++ -*-===//
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 contains machine code-specific flags that are shared between
10
// different command line tools.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
15
#define LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H
16
17
#include "llvm/MC/MCTargetOptions.h"
18
#include "llvm/Support/CommandLine.h"
19
using namespace llvm;
20
21
static cl::opt<MCTargetOptions::AsmInstrumentation> AsmInstrumentation(
22
    "asm-instrumentation", cl::desc("Instrumentation of inline assembly and "
23
                                    "assembly source files"),
24
    cl::init(MCTargetOptions::AsmInstrumentationNone),
25
    cl::values(clEnumValN(MCTargetOptions::AsmInstrumentationNone, "none",
26
                          "no instrumentation at all"),
27
               clEnumValN(MCTargetOptions::AsmInstrumentationAddress, "address",
28
                          "instrument instructions with memory arguments")));
29
30
static cl::opt<bool> RelaxAll("mc-relax-all",
31
                       cl::desc("When used with filetype=obj, "
32
                                "relax all fixups in the emitted object file"));
33
34
static cl::opt<bool> IncrementalLinkerCompatible(
35
    "incremental-linker-compatible",
36
    cl::desc(
37
        "When used with filetype=obj, "
38
        "emit an object file which can be used with an incremental linker"));
39
40
static cl::opt<bool> PIECopyRelocations("pie-copy-relocations", cl::desc("PIE Copy Relocations"));
41
42
static cl::opt<int> DwarfVersion("dwarf-version", cl::desc("Dwarf version"),
43
                          cl::init(0));
44
45
static cl::opt<bool> ShowMCInst("asm-show-inst",
46
                         cl::desc("Emit internal instruction representation to "
47
                                  "assembly file"));
48
49
static cl::opt<bool> FatalWarnings("fatal-warnings",
50
                            cl::desc("Treat warnings as errors"));
51
52
static cl::opt<bool> NoWarn("no-warn", cl::desc("Suppress all warnings"));
53
static cl::alias NoWarnW("W", cl::desc("Alias for --no-warn"), cl::aliasopt(NoWarn));
54
55
static cl::opt<bool> NoDeprecatedWarn("no-deprecated-warn",
56
                               cl::desc("Suppress all deprecated warnings"));
57
58
static cl::opt<std::string>
59
ABIName("target-abi", cl::Hidden,
60
        cl::desc("The name of the ABI to be targeted from the backend."),
61
        cl::init(""));
62
63
32.9k
static MCTargetOptions InitMCTargetOptionsFromFlags() {
64
32.9k
  MCTargetOptions Options;
65
32.9k
  Options.SanitizeAddress =
66
32.9k
      (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress);
67
32.9k
  Options.MCRelaxAll = RelaxAll;
68
32.9k
  Options.MCIncrementalLinkerCompatible = IncrementalLinkerCompatible;
69
32.9k
  Options.MCPIECopyRelocations = PIECopyRelocations;
70
32.9k
  Options.DwarfVersion = DwarfVersion;
71
32.9k
  Options.ShowMCInst = ShowMCInst;
72
32.9k
  Options.ABIName = ABIName;
73
32.9k
  Options.MCFatalWarnings = FatalWarnings;
74
32.9k
  Options.MCNoWarn = NoWarn;
75
32.9k
  Options.MCNoDeprecatedWarn = NoDeprecatedWarn;
76
32.9k
  return Options;
77
32.9k
}
opt.cpp:InitMCTargetOptionsFromFlags()
Line
Count
Source
63
10.4k
static MCTargetOptions InitMCTargetOptionsFromFlags() {
64
10.4k
  MCTargetOptions Options;
65
10.4k
  Options.SanitizeAddress =
66
10.4k
      (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress);
67
10.4k
  Options.MCRelaxAll = RelaxAll;
68
10.4k
  Options.MCIncrementalLinkerCompatible = IncrementalLinkerCompatible;
69
10.4k
  Options.MCPIECopyRelocations = PIECopyRelocations;
70
10.4k
  Options.DwarfVersion = DwarfVersion;
71
10.4k
  Options.ShowMCInst = ShowMCInst;
72
10.4k
  Options.ABIName = ABIName;
73
10.4k
  Options.MCFatalWarnings = FatalWarnings;
74
10.4k
  Options.MCNoWarn = NoWarn;
75
10.4k
  Options.MCNoDeprecatedWarn = NoDeprecatedWarn;
76
10.4k
  return Options;
77
10.4k
}
llc.cpp:InitMCTargetOptionsFromFlags()
Line
Count
Source
63
22.5k
static MCTargetOptions InitMCTargetOptionsFromFlags() {
64
22.5k
  MCTargetOptions Options;
65
22.5k
  Options.SanitizeAddress =
66
22.5k
      (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress);
67
22.5k
  Options.MCRelaxAll = RelaxAll;
68
22.5k
  Options.MCIncrementalLinkerCompatible = IncrementalLinkerCompatible;
69
22.5k
  Options.MCPIECopyRelocations = PIECopyRelocations;
70
22.5k
  Options.DwarfVersion = DwarfVersion;
71
22.5k
  Options.ShowMCInst = ShowMCInst;
72
22.5k
  Options.ABIName = ABIName;
73
22.5k
  Options.MCFatalWarnings = FatalWarnings;
74
22.5k
  Options.MCNoWarn = NoWarn;
75
22.5k
  Options.MCNoDeprecatedWarn = NoDeprecatedWarn;
76
22.5k
  return Options;
77
22.5k
}
78
79
#endif