Fix names of functions in TargetOptionsCommandFlags.h. NFC.
Differential Revision: https://reviews.llvm.org/D57555 llvm-svn: 352825
This commit is contained in:
parent
b6c6ab312e
commit
dfbd19033b
|
@ -43,7 +43,7 @@ using namespace lld::coff;
|
|||
|
||||
static std::unique_ptr<lto::LTO> createLTO() {
|
||||
lto::Config C;
|
||||
C.Options = InitTargetOptionsFromCodeGenFlags();
|
||||
C.Options = initTargetOptionsFromCodeGenFlags();
|
||||
|
||||
// Always emit a section per function/datum with LTO. LLVM LTO should get most
|
||||
// of the benefit of linker GC, but there are still opportunities for ICF.
|
||||
|
@ -60,8 +60,8 @@ static std::unique_ptr<lto::LTO> createLTO() {
|
|||
C.DisableVerify = true;
|
||||
C.DiagHandler = diagnosticHandler;
|
||||
C.OptLevel = Config->LTOO;
|
||||
C.CPU = GetCPUStr();
|
||||
C.MAttrs = GetMAttrs();
|
||||
C.CPU = getCPUStr();
|
||||
C.MAttrs = getMAttrs();
|
||||
C.CGOptLevel = args::getCGOptLevel(Config->LTOO);
|
||||
|
||||
if (Config->SaveTemps)
|
||||
|
|
|
@ -19,16 +19,17 @@
|
|||
#include "llvm/Target/TargetOptions.h"
|
||||
|
||||
// Define an externally visible version of
|
||||
// InitTargetOptionsFromCodeGenFlags, so that its functionality can be
|
||||
// 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.
|
||||
llvm::TargetOptions lld::InitTargetOptionsFromCodeGenFlags() {
|
||||
llvm::TargetOptions lld::initTargetOptionsFromCodeGenFlags() {
|
||||
return ::InitTargetOptionsFromCodeGenFlags();
|
||||
}
|
||||
|
||||
llvm::Optional<llvm::CodeModel::Model> lld::GetCodeModelFromCMModel() {
|
||||
llvm::Optional<llvm::CodeModel::Model> lld::getCodeModelFromCMModel() {
|
||||
return getCodeModel();
|
||||
}
|
||||
|
||||
std::string lld::GetCPUStr() { return ::getCPUStr(); }
|
||||
std::vector<std::string> lld::GetMAttrs() { return ::MAttrs; }
|
||||
std::string lld::getCPUStr() { return ::getCPUStr(); }
|
||||
|
||||
std::vector<std::string> lld::getMAttrs() { return ::MAttrs; }
|
||||
|
|
|
@ -68,7 +68,7 @@ static lto::Config createConfig() {
|
|||
lto::Config C;
|
||||
|
||||
// LLD supports the new relocations and address-significance tables.
|
||||
C.Options = InitTargetOptionsFromCodeGenFlags();
|
||||
C.Options = initTargetOptionsFromCodeGenFlags();
|
||||
C.Options.RelaxELFRelocations = true;
|
||||
C.Options.EmitAddrsig = true;
|
||||
|
||||
|
@ -83,12 +83,12 @@ static lto::Config createConfig() {
|
|||
else
|
||||
C.RelocModel = Reloc::Static;
|
||||
|
||||
C.CodeModel = GetCodeModelFromCMModel();
|
||||
C.CodeModel = getCodeModelFromCMModel();
|
||||
C.DisableVerify = Config->DisableVerify;
|
||||
C.DiagHandler = diagnosticHandler;
|
||||
C.OptLevel = Config->LTOO;
|
||||
C.CPU = GetCPUStr();
|
||||
C.MAttrs = GetMAttrs();
|
||||
C.CPU = getCPUStr();
|
||||
C.MAttrs = getMAttrs();
|
||||
C.CGOptLevel = args::getCGOptLevel(Config->LTOO);
|
||||
|
||||
// Set up a custom pipeline if we've been asked to.
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
#include "llvm/Target/TargetOptions.h"
|
||||
|
||||
namespace lld {
|
||||
llvm::TargetOptions InitTargetOptionsFromCodeGenFlags();
|
||||
llvm::Optional<llvm::CodeModel::Model> GetCodeModelFromCMModel();
|
||||
std::string GetCPUStr();
|
||||
std::vector<std::string> GetMAttrs();
|
||||
llvm::TargetOptions initTargetOptionsFromCodeGenFlags();
|
||||
llvm::Optional<llvm::CodeModel::Model> getCodeModelFromCMModel();
|
||||
std::string getCPUStr();
|
||||
std::vector<std::string> getMAttrs();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ using namespace lld::wasm;
|
|||
|
||||
static std::unique_ptr<lto::LTO> createLTO() {
|
||||
lto::Config C;
|
||||
C.Options = InitTargetOptionsFromCodeGenFlags();
|
||||
C.Options = initTargetOptionsFromCodeGenFlags();
|
||||
|
||||
// Always emit a section per function/data with LTO.
|
||||
C.Options.FunctionSections = true;
|
||||
|
@ -53,7 +53,7 @@ static std::unique_ptr<lto::LTO> createLTO() {
|
|||
C.DisableVerify = Config->DisableVerify;
|
||||
C.DiagHandler = diagnosticHandler;
|
||||
C.OptLevel = Config->LTOO;
|
||||
C.MAttrs = GetMAttrs();
|
||||
C.MAttrs = getMAttrs();
|
||||
C.CGOptLevel = args::getCGOptLevel(Config->LTOO);
|
||||
|
||||
if (Config->Relocatable)
|
||||
|
|
Loading…
Reference in New Issue