diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index 5a66a244bb113..3b3d77fd930a9 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -2053,8 +2053,9 @@ void tools::addX86AlignBranchArgs(const Driver &D, const ArgList &Args, /// static bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, - SmallVector LibraryPaths, std::string Lib, - StringRef Arch, StringRef Target, bool isBitCodeSDL) { + const SmallVectorImpl &LibraryPaths, + StringRef Lib, StringRef Arch, StringRef Target, + bool isBitCodeSDL) { SmallVector SDLs; std::string LibDeviceLoc = "/libdevice"; @@ -2131,8 +2132,9 @@ static bool SDLSearch(const Driver &D, const llvm::opt::ArgList &DriverArgs, static bool GetSDLFromOffloadArchive( Compilation &C, const Driver &D, const Tool &T, const JobAction &JA, const InputInfoList &Inputs, const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args, SmallVector LibraryPaths, - StringRef Lib, StringRef Arch, StringRef Target, bool isBitCodeSDL) { + llvm::opt::ArgStringList &CC1Args, + const SmallVectorImpl &LibraryPaths, StringRef Lib, + StringRef Arch, StringRef Target, bool isBitCodeSDL) { // We don't support bitcode archive bundles for nvptx if (isBitCodeSDL && Arch.contains("nvptx"))