@@ -2791,7 +2791,7 @@ bool Driver::checkForOffloadStaticLib(Compilation &C,
2791
2791
if (Args.hasArg (options::OPT_offload_lib_Group))
2792
2792
return true ;
2793
2793
SmallVector<const char *, 16 > OffloadLibArgs (getLinkerArgs (C, Args));
2794
- for (const StringRef & OLArg : OffloadLibArgs)
2794
+ for (StringRef OLArg : OffloadLibArgs)
2795
2795
if (isStaticArchiveFile (OLArg) && hasOffloadSections (C, OLArg, Args)) {
2796
2796
// FPGA binaries with AOCX or AOCR sections are not considered fat
2797
2797
// static archives.
@@ -4443,7 +4443,7 @@ class OffloadingActionBuilder final {
4443
4443
// incorporated into the aoc compilation
4444
4444
if (SYCLfpgaTriple) {
4445
4445
SmallVector<const char *, 16 > LinkArgs (getLinkerArgs (C, Args));
4446
- for (const StringRef & LA : LinkArgs) {
4446
+ for (StringRef LA : LinkArgs) {
4447
4447
if (isStaticArchiveFile (LA) && hasOffloadSections (C, LA, Args)) {
4448
4448
const llvm::opt::OptTable &Opts = C.getDriver ().getOpts ();
4449
4449
Arg *InputArg = MakeInputArg (Args, Opts, Args.MakeArgString (LA));
@@ -5124,7 +5124,7 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
5124
5124
UnbundlerInputs.push_back (Current);
5125
5125
};
5126
5126
bool IsWholeArchive = false ;
5127
- for (const StringRef & LA : LinkArgs) {
5127
+ for (StringRef LA : LinkArgs) {
5128
5128
if (isStaticArchiveFile (LA)) {
5129
5129
addUnbundlerInput (
5130
5130
IsWholeArchive ? types::TY_WholeArchive : types::TY_Archive, LA);
0 commit comments