forked from OSchip/llvm-project
[Driver] Drop unnecessary const from return types (NFC)
Identified with readability-const-return-type.
This commit is contained in:
parent
5449d2da65
commit
15cd16aaf0
|
@ -51,7 +51,7 @@ protected:
|
||||||
const std::map<options::ID, const StringRef> OptionsDefault;
|
const std::map<options::ID, const StringRef> OptionsDefault;
|
||||||
|
|
||||||
Tool *buildLinker() const override;
|
Tool *buildLinker() const override;
|
||||||
const StringRef getOptionDefault(options::ID OptID) const {
|
StringRef getOptionDefault(options::ID OptID) const {
|
||||||
auto opt = OptionsDefault.find(OptID);
|
auto opt = OptionsDefault.find(OptID);
|
||||||
assert(opt != OptionsDefault.end() && "No Default for Option");
|
assert(opt != OptionsDefault.end() && "No Default for Option");
|
||||||
return opt->second;
|
return opt->second;
|
||||||
|
|
|
@ -849,7 +849,7 @@ fp16_fml_fallthrough:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string arm::getARMArch(StringRef Arch, const llvm::Triple &Triple) {
|
std::string arm::getARMArch(StringRef Arch, const llvm::Triple &Triple) {
|
||||||
std::string MArch;
|
std::string MArch;
|
||||||
if (!Arch.empty())
|
if (!Arch.empty())
|
||||||
MArch = std::string(Arch);
|
MArch = std::string(Arch);
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace arm {
|
||||||
|
|
||||||
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch,
|
std::string getARMTargetCPU(StringRef CPU, llvm::StringRef Arch,
|
||||||
const llvm::Triple &Triple);
|
const llvm::Triple &Triple);
|
||||||
const std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
|
std::string getARMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
|
||||||
StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
|
StringRef getARMCPUForMArch(llvm::StringRef Arch, const llvm::Triple &Triple);
|
||||||
llvm::ARM::ArchKind getLLVMArchKindForARM(StringRef CPU, StringRef Arch,
|
llvm::ARM::ArchKind getLLVMArchKindForARM(StringRef CPU, StringRef Arch,
|
||||||
const llvm::Triple &Triple);
|
const llvm::Triple &Triple);
|
||||||
|
|
|
@ -34,7 +34,7 @@ using namespace clang::driver::toolchains;
|
||||||
using namespace clang;
|
using namespace clang;
|
||||||
using namespace llvm::opt;
|
using namespace llvm::opt;
|
||||||
|
|
||||||
static const VersionTuple minimumMacCatalystDeploymentTarget() {
|
static VersionTuple minimumMacCatalystDeploymentTarget() {
|
||||||
return VersionTuple(13, 1);
|
return VersionTuple(13, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -704,11 +704,11 @@ bool HexagonToolChain::isAutoHVXEnabled(const llvm::opt::ArgList &Args) {
|
||||||
// Returns the default CPU for Hexagon. This is the default compilation target
|
// Returns the default CPU for Hexagon. This is the default compilation target
|
||||||
// if no Hexagon processor is selected at the command-line.
|
// if no Hexagon processor is selected at the command-line.
|
||||||
//
|
//
|
||||||
const StringRef HexagonToolChain::GetDefaultCPU() {
|
StringRef HexagonToolChain::GetDefaultCPU() {
|
||||||
return "hexagonv60";
|
return "hexagonv60";
|
||||||
}
|
}
|
||||||
|
|
||||||
const StringRef HexagonToolChain::GetTargetCPUVersion(const ArgList &Args) {
|
StringRef HexagonToolChain::GetTargetCPUVersion(const ArgList &Args) {
|
||||||
Arg *CpuArg = nullptr;
|
Arg *CpuArg = nullptr;
|
||||||
if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ))
|
if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ))
|
||||||
CpuArg = A;
|
CpuArg = A;
|
||||||
|
|
|
@ -107,8 +107,8 @@ public:
|
||||||
std::string getCompilerRTPath() const override;
|
std::string getCompilerRTPath() const override;
|
||||||
|
|
||||||
static bool isAutoHVXEnabled(const llvm::opt::ArgList &Args);
|
static bool isAutoHVXEnabled(const llvm::opt::ArgList &Args);
|
||||||
static const StringRef GetDefaultCPU();
|
static StringRef GetDefaultCPU();
|
||||||
static const StringRef GetTargetCPUVersion(const llvm::opt::ArgList &Args);
|
static StringRef GetTargetCPUVersion(const llvm::opt::ArgList &Args);
|
||||||
|
|
||||||
static Optional<unsigned> getSmallDataThreshold(
|
static Optional<unsigned> getSmallDataThreshold(
|
||||||
const llvm::opt::ArgList &Args);
|
const llvm::opt::ArgList &Args);
|
||||||
|
|
Loading…
Reference in New Issue