From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- lld/Common/TargetOptionsCommandFlags.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'lld/Common/TargetOptionsCommandFlags.cpp') diff --git a/lld/Common/TargetOptionsCommandFlags.cpp b/lld/Common/TargetOptionsCommandFlags.cpp index 0137feb63f371..9b166a3e130a5 100644 --- a/lld/Common/TargetOptionsCommandFlags.cpp +++ b/lld/Common/TargetOptionsCommandFlags.cpp @@ -5,35 +5,26 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -// -// This file exists as a place for global variables defined in LLVM's -// CodeGen/CommandFlags.inc. By putting the resulting object file in -// an archive and linking with it, the definitions will automatically be -// included when needed and skipped when already present. -// -//===----------------------------------------------------------------------===// #include "lld/Common/TargetOptionsCommandFlags.h" -#include "llvm/CodeGen/CommandFlags.inc" +#include "llvm/CodeGen/CommandFlags.h" #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 -// would lead to multiple definitions of the command line flags. +static llvm::codegen::RegisterCodeGenFlags CGF; + llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() { - return ::InitTargetOptionsFromCodeGenFlags(); + return llvm::codegen::InitTargetOptionsFromCodeGenFlags(); } llvm::Optional lld::getRelocModelFromCMModel() { - return getRelocModel(); + return llvm::codegen::getExplicitRelocModel(); } llvm::Optional lld::getCodeModelFromCMModel() { - return getCodeModel(); + return llvm::codegen::getExplicitCodeModel(); } -std::string lld::getCPUStr() { return ::getCPUStr(); } +std::string lld::getCPUStr() { return llvm::codegen::getCPUStr(); } -std::vector lld::getMAttrs() { return ::MAttrs; } +std::vector lld::getMAttrs() { return llvm::codegen::getMAttrs(); } -- cgit v1.3