[lld] r301759 - Rename RPath Rpath for consistency. NFC.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 30 22:11:28 PDT 2017
On Sat, Apr 29, 2017 at 4:06 PM, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Sat Apr 29 18:06:43 2017
> New Revision: 301759
>
> URL: http://llvm.org/viewvc/llvm-project?rev=301759&view=rev
> Log:
> Rename RPath Rpath for consistency. NFC.
>
> For an option -foo-bar-baz, we have Config->FooBarBaz. Since -rpath is
> -rpath and not -r-path, it should be Config->Rpath instead Config->RPath.
>
Do we describe this convention anywhere in the comments? I think we should
(and I don't remember seeing it anywhere).
-- Sean Silva
>
> Modified:
> lld/trunk/ELF/Config.h
> lld/trunk/ELF/Driver.cpp
> lld/trunk/ELF/SyntheticSections.cpp
>
> Modified: lld/trunk/ELF/Config.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.
> h?rev=301759&r1=301758&r2=301759&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/Config.h (original)
> +++ lld/trunk/ELF/Config.h Sat Apr 29 18:06:43 2017
> @@ -89,7 +89,7 @@ struct Configuration {
> llvm::StringRef SoName;
> llvm::StringRef Sysroot;
> llvm::StringRef ThinLTOCacheDir;
> - std::string RPath;
> + std::string Rpath;
> std::vector<VersionDefinition> VersionDefinitions;
> std::vector<llvm::StringRef> AuxiliaryList;
> std::vector<llvm::StringRef> SearchPaths;
>
> Modified: lld/trunk/ELF/Driver.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.
> cpp?rev=301759&r1=301758&r2=301759&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/Driver.cpp (original)
> +++ lld/trunk/ELF/Driver.cpp Sat Apr 29 18:06:43 2017
> @@ -399,7 +399,7 @@ static std::vector<StringRef> getArgs(op
> return V;
> }
>
> -static std::string getRPath(opt::InputArgList &Args) {
> +static std::string getRpath(opt::InputArgList &Args) {
> std::vector<StringRef> V = getArgs(Args, OPT_rpath);
> return llvm::join(V.begin(), V.end(), ":");
> }
> @@ -640,7 +640,7 @@ void LinkerDriver::readConfigs(opt::Inpu
> Config->OutputFile = getString(Args, OPT_o);
> Config->Pie = getArg(Args, OPT_pie, OPT_nopie, false);
> Config->PrintGcSections = Args.hasArg(OPT_print_gc_sections);
> - Config->RPath = getRPath(Args);
> + Config->Rpath = getRpath(Args);
> Config->Relocatable = Args.hasArg(OPT_relocatable);
> Config->SaveTemps = Args.hasArg(OPT_save_temps);
> Config->SearchPaths = getArgs(Args, OPT_L);
>
> Modified: lld/trunk/ELF/SyntheticSections.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/
> SyntheticSections.cpp?rev=301759&r1=301758&r2=301759&view=diff
> ============================================================
> ==================
> --- lld/trunk/ELF/SyntheticSections.cpp (original)
> +++ lld/trunk/ELF/SyntheticSections.cpp Sat Apr 29 18:06:43 2017
> @@ -1022,9 +1022,9 @@ template <class ELFT> void DynamicSectio
> // fixed early.
> for (StringRef S : Config->AuxiliaryList)
> add({DT_AUXILIARY, In<ELFT>::DynStrTab->addString(S)});
> - if (!Config->RPath.empty())
> + if (!Config->Rpath.empty())
> add({Config->EnableNewDtags ? DT_RUNPATH : DT_RPATH,
> - In<ELFT>::DynStrTab->addString(Config->RPath)});
> + In<ELFT>::DynStrTab->addString(Config->Rpath)});
> for (SharedFile<ELFT> *F : Symtab<ELFT>::X->getSharedFiles())
> if (F->isNeeded())
> add({DT_NEEDED, In<ELFT>::DynStrTab->addString(F->SoName)});
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170430/29c19824/attachment.html>
More information about the llvm-commits
mailing list