Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions clang/include/clang/Driver/CommonArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ std::string getCPUName(const Driver &D, const llvm::opt::ArgList &Args,
void getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args,
llvm::opt::ArgStringList &CmdArgs, bool ForAS,
bool IsAux = false,
const StringRef TcTargetID = StringRef());
bool IsAux = false);

/// Iterate \p Args and convert -mxxx to +xxx and -mno-xxx to -xxx and
/// append it to \p Features.
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/Driver/ToolChains/AMDGPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,7 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
void amdgpu::getAMDGPUTargetFeatures(const Driver &D,
const llvm::Triple &Triple,
const llvm::opt::ArgList &Args,
std::vector<StringRef> &Features,
StringRef /*TcTargetID*/) {
std::vector<StringRef> &Features) {
if (Args.hasFlag(options::OPT_mwavefrontsize64,
options::OPT_mno_wavefrontsize64, false))
Features.push_back("+wavefrontsize64");
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/Driver/ToolChains/AMDGPU.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {

void getAMDGPUTargetFeatures(const Driver &D, const llvm::Triple &Triple,
const llvm::opt::ArgList &Args,
std::vector<StringRef> &Features,
StringRef TcTargetID = StringRef());
std::vector<StringRef> &Features);

namespace dlr {
llvm::SmallVector<ToolChain::BitCodeLibraryInfo, 12>
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9746,7 +9746,7 @@ void OffloadPackager::ConstructJob(Compilation &C, const JobAction &JA,
ArgStringList Features;
SmallVector<StringRef> FeatureArgs;
getTargetFeatures(TC->getDriver(), TC->getTriple(), TCArgs, Features, false,
false, Arch.ArchName);
false);
llvm::copy_if(Features, std::back_inserter(FeatureArgs),
[](StringRef Arg) { return !Arg.starts_with("-target"); });

Expand Down
5 changes: 2 additions & 3 deletions clang/lib/Driver/ToolChains/CommonArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,7 @@ static void getWebAssemblyTargetFeatures(const Driver &D,

void tools::getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
const ArgList &Args, ArgStringList &CmdArgs,
bool ForAS, bool IsAux,
const StringRef TcTargetID) {
bool ForAS, bool IsAux) {
std::vector<StringRef> Features;
switch (Triple.getArch()) {
default:
Expand Down Expand Up @@ -924,7 +923,7 @@ void tools::getTargetFeatures(const Driver &D, const llvm::Triple &Triple,
break;
case llvm::Triple::r600:
case llvm::Triple::amdgcn:
amdgpu::getAMDGPUTargetFeatures(D, Triple, Args, Features, TcTargetID);
amdgpu::getAMDGPUTargetFeatures(D, Triple, Args, Features);
break;
case llvm::Triple::nvptx:
case llvm::Triple::nvptx64:
Expand Down
Loading