annotate lld/Common/TargetOptionsCommandFlags.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 0572611fdcc8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 //===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
anatofuz
parents:
diff changeset
2 //
anatofuz
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
6 //
anatofuz
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
8 //
anatofuz
parents:
diff changeset
9 // This file exists as a place for global variables defined in LLVM's
anatofuz
parents:
diff changeset
10 // CodeGen/CommandFlags.inc. By putting the resulting object file in
anatofuz
parents:
diff changeset
11 // an archive and linking with it, the definitions will automatically be
anatofuz
parents:
diff changeset
12 // included when needed and skipped when already present.
anatofuz
parents:
diff changeset
13 //
anatofuz
parents:
diff changeset
14 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16 #include "lld/Common/TargetOptionsCommandFlags.h"
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 #include "llvm/CodeGen/CommandFlags.inc"
anatofuz
parents:
diff changeset
19 #include "llvm/Target/TargetOptions.h"
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 // Define an externally visible version of
anatofuz
parents:
diff changeset
22 // initTargetOptionsFromCodeGenFlags, so that its functionality can be
anatofuz
parents:
diff changeset
23 // used without having to include llvm/CodeGen/CommandFlags.inc, which
anatofuz
parents:
diff changeset
24 // would lead to multiple definitions of the command line flags.
anatofuz
parents:
diff changeset
25 llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
anatofuz
parents:
diff changeset
26 return ::InitTargetOptionsFromCodeGenFlags();
anatofuz
parents:
diff changeset
27 }
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 llvm::Optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
anatofuz
parents:
diff changeset
30 return getRelocModel();
anatofuz
parents:
diff changeset
31 }
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
anatofuz
parents:
diff changeset
34 return getCodeModel();
anatofuz
parents:
diff changeset
35 }
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 std::string lld::getCPUStr() { return ::getCPUStr(); }
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 std::vector<std::string> lld::getMAttrs() { return ::MAttrs; }