Index: include/clang/Driver/Driver.h =================================================================== --- include/clang/Driver/Driver.h +++ include/clang/Driver/Driver.h @@ -449,19 +449,20 @@ /// Returns the default name for linked images (e.g., "a.out"). const char *getDefaultImageName() const; - /// GetNamedOutputPath - Return the name to use for the output of - /// the action \p JA. The result is appended to the compilation's - /// list of temporary or result files, as appropriate. + /// Computes the name to use for the output of the action \p JA and appends it + /// to the compilation's list of temporary or result files, as appropriate. /// /// \param C - The compilation. /// \param JA - The action of interest. /// \param BaseInput - The original input file that this action was /// triggered by. - /// \param BoundArch - The bound architecture. + /// \param BoundArch - The bound architecture. /// \param AtTopLevel - Whether this is a "top-level" action. /// \param MultipleArchs - Whether multiple -arch options were supplied. /// \param NormalizedTriple - The normalized triple of the relevant target. - const char *GetNamedOutputPath(Compilation &C, const JobAction &JA, + // + // \return The name to use for the output of the action \p JA. + const char *addNamedOutputPath(Compilation &C, const JobAction &JA, const char *BaseInput, StringRef BoundArch, bool AtTopLevel, bool MultipleArchs, StringRef NormalizedTriple) const; Index: lib/Driver/Driver.cpp =================================================================== --- lib/Driver/Driver.cpp +++ lib/Driver/Driver.cpp @@ -3308,7 +3308,7 @@ UI.DependentToolChain->getTriple().normalize(), /*CreatePrefixForHost=*/true); auto CurI = InputInfo( - UA, GetNamedOutputPath(C, *UA, BaseInput, UI.DependentBoundArch, + UA, addNamedOutputPath(C, *UA, BaseInput, UI.DependentBoundArch, /*AtTopLevel=*/false, MultipleArchs, OffloadingPrefix), BaseInput); @@ -3338,7 +3338,7 @@ A->getOffloadingDeviceKind(), TC->getTriple().normalize(), /*CreatePrefixForHost=*/!!A->getOffloadingHostActiveKinds() && !AtTopLevel); - Result = InputInfo(A, GetNamedOutputPath(C, *JA, BaseInput, BoundArch, + Result = InputInfo(A, addNamedOutputPath(C, *JA, BaseInput, BoundArch, AtTopLevel, MultipleArchs, OffloadingPrefix), BaseInput); @@ -3416,7 +3416,7 @@ return Args.MakeArgString(Filename.c_str()); } -const char *Driver::GetNamedOutputPath(Compilation &C, const JobAction &JA, +const char *Driver::addNamedOutputPath(Compilation &C, const JobAction &JA, const char *BaseInput, StringRef BoundArch, bool AtTopLevel, bool MultipleArchs,