Files
llvm-project/lld/Common/TargetOptionsCommandFlags.cpp
T

40 lines
1.5 KiB
C++
Raw Normal View History

2017-02-02 23:53:10 +00:00
//===-- TargetOptionsCommandFlags.cpp ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2017-02-02 23:53:10 +00:00
//
//===----------------------------------------------------------------------===//
//
// This file exists as a place for global variables defined in LLVM's
// CodeGen/CommandFlags.inc. By putting the resulting object file in
2017-02-02 23:53:10 +00:00
// an archive and linking with it, the definitions will automatically be
// included when needed and skipped when already present.
//
//===----------------------------------------------------------------------===//
2017-10-02 21:00:41 +00:00
#include "lld/Common/TargetOptionsCommandFlags.h"
2017-02-02 23:53:10 +00:00
2018-04-11 18:49:41 +00:00
#include "llvm/CodeGen/CommandFlags.inc"
2017-02-02 23:53:10 +00:00
#include "llvm/Target/TargetOptions.h"
// Define an externally visible version of
// initTargetOptionsFromCodeGenFlags, so that its functionality can be
// used without having to include llvm/CodeGen/CommandFlags.inc, which
2017-02-02 23:53:10 +00:00
// would lead to multiple definitions of the command line flags.
llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
2017-02-02 23:53:10 +00:00
return ::InitTargetOptionsFromCodeGenFlags();
}
llvm::Optional<llvm::Reloc::Model> lld::getRelocModelFromCMModel() {
return getRelocModel();
}
llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
2017-08-03 02:16:33 +00:00
return getCodeModel();
}
2018-01-30 18:18:59 +00:00
std::string lld::getCPUStr() { return ::getCPUStr(); }
std::vector<std::string> lld::getMAttrs() { return ::MAttrs; }