<div dir="ltr">Might it be better to name it explicitly LldObjectFile - ObjFile and ObjectFile seem like they could be easily confused/confusing?</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 26, 2017 at 3:59 PM Rafael Avila de Espindola via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks!<br>
<br>
Rui Ueyama via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> writes:<br>
<br>
> Author: ruiu<br>
> Date: Wed Jul 26 15:13:32 2017<br>
> New Revision: 309199<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=309199&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=309199&view=rev</a><br>
> Log:<br>
> Rename ObjectFile -> ObjFile.<br>
><br>
> Rename it because it was too easy to conflict with llvm::object::ObjectFile<br>
> which broke buildbots several times.<br>
><br>
> Modified:<br>
> lld/trunk/ELF/Arch/MipsArchTree.cpp<br>
> lld/trunk/ELF/Driver.cpp<br>
> lld/trunk/ELF/GdbIndex.cpp<br>
> lld/trunk/ELF/GdbIndex.h<br>
> lld/trunk/ELF/InputFiles.cpp<br>
> lld/trunk/ELF/InputFiles.h<br>
> lld/trunk/ELF/InputSection.cpp<br>
> lld/trunk/ELF/InputSection.h<br>
> lld/trunk/ELF/LinkerScript.cpp<br>
> lld/trunk/ELF/MapFile.cpp<br>
> lld/trunk/ELF/OutputSections.h<br>
> lld/trunk/ELF/SymbolTable.cpp<br>
> lld/trunk/ELF/SymbolTable.h<br>
> lld/trunk/ELF/Symbols.cpp<br>
> lld/trunk/ELF/Symbols.h<br>
> lld/trunk/ELF/SyntheticSections.cpp<br>
> lld/trunk/ELF/Writer.cpp<br>
> lld/trunk/ELF/Writer.h<br>
><br>
> Modified: lld/trunk/ELF/Arch/MipsArchTree.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/MipsArchTree.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/MipsArchTree.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/Arch/MipsArchTree.cpp (original)<br>
> +++ lld/trunk/ELF/Arch/MipsArchTree.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -283,7 +283,7 @@ static uint32_t getArchFlags(ArrayRef<Fi<br>
><br>
> template <class ELFT> uint32_t elf::getMipsEFlags() {<br>
> std::vector<FileFlags> V;<br>
> - for (elf::ObjectFile<ELFT> *F : ObjectFile<ELFT>::Instances)<br>
> + for (ObjFile<ELFT> *F : ObjFile<ELFT>::Instances)<br>
> V.push_back({F->getName(), F->getObj().getHeader()->e_flags});<br>
> if (V.empty())<br>
> return 0;<br>
><br>
> Modified: lld/trunk/ELF/Driver.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/Driver.cpp (original)<br>
> +++ lld/trunk/ELF/Driver.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -188,7 +188,7 @@ void LinkerDriver::addFile(StringRef Pat<br>
> // we'll handle it as if it had a symbol table.<br>
> if (!File->isEmpty() && !File->hasSymbolTable()) {<br>
> for (const auto &P : getArchiveMembers(MBRef))<br>
> - Files.push_back(make<LazyObjectFile>(P.first, Path, P.second));<br>
> + Files.push_back(make<LazyObjFile>(P.first, Path, P.second));<br>
> return;<br>
> }<br>
><br>
> @@ -217,7 +217,7 @@ void LinkerDriver::addFile(StringRef Pat<br>
> return;<br>
> default:<br>
> if (InLib)<br>
> - Files.push_back(make<LazyObjectFile>(MBRef, "", 0));<br>
> + Files.push_back(make<LazyObjFile>(MBRef, "", 0));<br>
> else<br>
> Files.push_back(createObjectFile(MBRef));<br>
> }<br>
> @@ -1031,7 +1031,7 @@ template <class ELFT> void LinkerDriver:<br>
> // Now that we have a complete list of input files.<br>
> // Beyond this point, no new files are added.<br>
> // Aggregate all input sections into one place.<br>
> - for (elf::ObjectFile<ELFT> *F : ObjectFile<ELFT>::Instances)<br>
> + for (ObjFile<ELFT> *F : ObjFile<ELFT>::Instances)<br>
> for (InputSectionBase *S : F->getSections())<br>
> if (S && S != &InputSection::Discarded)<br>
> InputSections.push_back(S);<br>
><br>
> Modified: lld/trunk/ELF/GdbIndex.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/GdbIndex.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/GdbIndex.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/GdbIndex.cpp (original)<br>
> +++ lld/trunk/ELF/GdbIndex.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -49,7 +49,7 @@ void GdbHashTab::finalizeContents() {<br>
> }<br>
><br>
> template <class ELFT><br>
> -LLDDwarfObj<ELFT>::LLDDwarfObj(elf::ObjectFile<ELFT> *Obj) : Obj(Obj) {<br>
> +LLDDwarfObj<ELFT>::LLDDwarfObj(ObjFile<ELFT> *Obj) : Obj(Obj) {<br>
> for (InputSectionBase *Sec : Obj->getSections()) {<br>
> if (!Sec)<br>
> continue;<br>
> @@ -84,7 +84,7 @@ LLDDwarfObj<ELFT>::findAux(const InputSe<br>
> if (I == Rels.end())<br>
> return None;<br>
> const RelTy &Rel = *I;<br>
> - const elf::ObjectFile<ELFT> *File = Sec.getFile<ELFT>();<br>
> + const ObjFile<ELFT> *File = Sec.getFile<ELFT>();<br>
> uint32_t SymIndex = Rel.getSymbol(Config->IsMips64EL);<br>
> const typename ELFT::Sym &Sym = File->getELFSymbols()[SymIndex];<br>
> uint32_t SecIndex = File->getSectionIndex(Sym);<br>
><br>
> Modified: lld/trunk/ELF/GdbIndex.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/GdbIndex.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/GdbIndex.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/GdbIndex.h (original)<br>
> +++ lld/trunk/ELF/GdbIndex.h Wed Jul 26 15:13:32 2017<br>
> @@ -24,7 +24,7 @@ struct LLDDWARFSection final : public ll<br>
> };<br>
><br>
> template <class ELFT> class LLDDwarfObj final : public llvm::DWARFObject {<br>
> - elf::ObjectFile<ELFT> *Obj;<br>
> + ObjFile<ELFT> *Obj;<br>
> LLDDWARFSection InfoSection;<br>
> LLDDWARFSection RangeSection;<br>
> LLDDWARFSection LineSection;<br>
> @@ -38,7 +38,7 @@ template <class ELFT> class LLDDwarfObj<br>
> ArrayRef<RelTy> Rels) const;<br>
><br>
> public:<br>
> - explicit LLDDwarfObj(elf::ObjectFile<ELFT> *Obj);<br>
> + explicit LLDDwarfObj(ObjFile<ELFT> *Obj);<br>
> const llvm::DWARFSection &getInfoSection() const override {<br>
> return InfoSection;<br>
> }<br>
><br>
> Modified: lld/trunk/ELF/InputFiles.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/InputFiles.cpp (original)<br>
> +++ lld/trunk/ELF/InputFiles.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -62,7 +62,7 @@ Optional<MemoryBufferRef> elf::readFile(<br>
> return MBRef;<br>
> }<br>
><br>
> -template <class ELFT> void elf::ObjectFile<ELFT>::initializeDwarfLine() {<br>
> +template <class ELFT> void ObjFile<ELFT>::initializeDwarfLine() {<br>
> DWARFContext Dwarf(make_unique<LLDDwarfObj<ELFT>>(this));<br>
> const DWARFObject &Obj = Dwarf.getDWARFObj();<br>
> DwarfLine.reset(new DWARFDebugLine);<br>
> @@ -78,8 +78,8 @@ template <class ELFT> void elf::ObjectFi<br>
> // Returns source line information for a given offset<br>
> // using DWARF debug info.<br>
> template <class ELFT><br>
> -Optional<DILineInfo> elf::ObjectFile<ELFT>::getDILineInfo(InputSectionBase *S,<br>
> - uint64_t Offset) {<br>
> +Optional<DILineInfo> ObjFile<ELFT>::getDILineInfo(InputSectionBase *S,<br>
> + uint64_t Offset) {<br>
> llvm::call_once(InitDwarfLine, [this]() { initializeDwarfLine(); });<br>
><br>
> // The offset to CU is 0.<br>
> @@ -101,8 +101,7 @@ Optional<DILineInfo> elf::ObjectFile<ELF<br>
> // Returns source line information for a given offset<br>
> // using DWARF debug info.<br>
> template <class ELFT><br>
> -std::string elf::ObjectFile<ELFT>::getLineInfo(InputSectionBase *S,<br>
> - uint64_t Offset) {<br>
> +std::string ObjFile<ELFT>::getLineInfo(InputSectionBase *S, uint64_t Offset) {<br>
> if (Optional<DILineInfo> Info = getDILineInfo(S, Offset))<br>
> return Info->FileName + ":" + std::to_string(Info->Line);<br>
> return "";<br>
> @@ -157,27 +156,25 @@ void ELFFileBase<ELFT>::initSymtab(Array<br>
> }<br>
><br>
> template <class ELFT><br>
> -elf::ObjectFile<ELFT>::ObjectFile(MemoryBufferRef M, StringRef ArchiveName)<br>
> +ObjFile<ELFT>::ObjFile(MemoryBufferRef M, StringRef ArchiveName)<br>
> : ELFFileBase<ELFT>(Base::ObjectKind, M) {<br>
> this->ArchiveName = ArchiveName;<br>
> }<br>
><br>
> -template <class ELFT><br>
> -ArrayRef<SymbolBody *> elf::ObjectFile<ELFT>::getLocalSymbols() {<br>
> +template <class ELFT> ArrayRef<SymbolBody *> ObjFile<ELFT>::getLocalSymbols() {<br>
> if (this->SymbolBodies.empty())<br>
> return this->SymbolBodies;<br>
> return makeArrayRef(this->SymbolBodies).slice(1, this->FirstNonLocal - 1);<br>
> }<br>
><br>
> -template <class ELFT><br>
> -ArrayRef<SymbolBody *> elf::ObjectFile<ELFT>::getSymbols() {<br>
> +template <class ELFT> ArrayRef<SymbolBody *> ObjFile<ELFT>::getSymbols() {<br>
> if (this->SymbolBodies.empty())<br>
> return this->SymbolBodies;<br>
> return makeArrayRef(this->SymbolBodies).slice(1);<br>
> }<br>
><br>
> template <class ELFT><br>
> -void elf::ObjectFile<ELFT>::parse(DenseSet<CachedHashStringRef> &ComdatGroups) {<br>
> +void ObjFile<ELFT>::parse(DenseSet<CachedHashStringRef> &ComdatGroups) {<br>
> // Read section and symbol tables.<br>
> initializeSections(ComdatGroups);<br>
> initializeSymbols();<br>
> @@ -187,9 +184,8 @@ void elf::ObjectFile<ELFT>::parse(DenseS<br>
> // They are identified and deduplicated by group name. This function<br>
> // returns a group name.<br>
> template <class ELFT><br>
> -StringRef<br>
> -elf::ObjectFile<ELFT>::getShtGroupSignature(ArrayRef<Elf_Shdr> Sections,<br>
> - const Elf_Shdr &Sec) {<br>
> +StringRef ObjFile<ELFT>::getShtGroupSignature(ArrayRef<Elf_Shdr> Sections,<br>
> + const Elf_Shdr &Sec) {<br>
> // Group signatures are stored as symbol names in object files.<br>
> // sh_info contains a symbol index, so we fetch a symbol and read its name.<br>
> if (this->Symbols.empty())<br>
> @@ -214,8 +210,8 @@ elf::ObjectFile<ELFT>::getShtGroupSignat<br>
> }<br>
><br>
> template <class ELFT><br>
> -ArrayRef<typename elf::ObjectFile<ELFT>::Elf_Word><br>
> -elf::ObjectFile<ELFT>::getShtGroupEntries(const Elf_Shdr &Sec) {<br>
> +ArrayRef<typename ObjFile<ELFT>::Elf_Word><br>
> +ObjFile<ELFT>::getShtGroupEntries(const Elf_Shdr &Sec) {<br>
> const ELFFile<ELFT> &Obj = this->getObj();<br>
> ArrayRef<Elf_Word> Entries = check(<br>
> Obj.template getSectionContentsAsArray<Elf_Word>(&Sec), toString(this));<br>
> @@ -224,8 +220,7 @@ elf::ObjectFile<ELFT>::getShtGroupEntrie<br>
> return Entries.slice(1);<br>
> }<br>
><br>
> -template <class ELFT><br>
> -bool elf::ObjectFile<ELFT>::shouldMerge(const Elf_Shdr &Sec) {<br>
> +template <class ELFT> bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &Sec) {<br>
> // We don't merge sections if -O0 (default is -O1). This makes sometimes<br>
> // the linker significantly faster, although the output will be bigger.<br>
> if (Config->Optimize == 0)<br>
> @@ -278,7 +273,7 @@ bool elf::ObjectFile<ELFT>::shouldMerge(<br>
> }<br>
><br>
> template <class ELFT><br>
> -void elf::ObjectFile<ELFT>::initializeSections(<br>
> +void ObjFile<ELFT>::initializeSections(<br>
> DenseSet<CachedHashStringRef> &ComdatGroups) {<br>
> const ELFFile<ELFT> &Obj = this->getObj();<br>
><br>
> @@ -356,7 +351,7 @@ void elf::ObjectFile<ELFT>::initializeSe<br>
> }<br>
><br>
> template <class ELFT><br>
> -InputSectionBase *elf::ObjectFile<ELFT>::getRelocTarget(const Elf_Shdr &Sec) {<br>
> +InputSectionBase *ObjFile<ELFT>::getRelocTarget(const Elf_Shdr &Sec) {<br>
> uint32_t Idx = Sec.sh_info;<br>
> if (Idx >= this->Sections.size())<br>
> fatal(toString(this) + ": invalid relocated section index: " + Twine(Idx));<br>
> @@ -383,8 +378,7 @@ InputSectionBase *toRegularSection(Merge<br>
> }<br>
><br>
> template <class ELFT><br>
> -InputSectionBase *<br>
> -elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {<br>
> +InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {<br>
> StringRef Name = getSectionName(Sec);<br>
><br>
> switch (Sec.sh_type) {<br>
> @@ -523,19 +517,19 @@ elf::ObjectFile<ELFT>::createInputSectio<br>
> }<br>
><br>
> template <class ELFT><br>
> -StringRef elf::ObjectFile<ELFT>::getSectionName(const Elf_Shdr &Sec) {<br>
> +StringRef ObjFile<ELFT>::getSectionName(const Elf_Shdr &Sec) {<br>
> return check(this->getObj().getSectionName(&Sec, SectionStringTable),<br>
> toString(this));<br>
> }<br>
><br>
> -template <class ELFT> void elf::ObjectFile<ELFT>::initializeSymbols() {<br>
> +template <class ELFT> void ObjFile<ELFT>::initializeSymbols() {<br>
> SymbolBodies.reserve(this->Symbols.size());<br>
> for (const Elf_Sym &Sym : this->Symbols)<br>
> SymbolBodies.push_back(createSymbolBody(&Sym));<br>
> }<br>
><br>
> template <class ELFT><br>
> -InputSectionBase *elf::ObjectFile<ELFT>::getSection(const Elf_Sym &Sym) const {<br>
> +InputSectionBase *ObjFile<ELFT>::getSection(const Elf_Sym &Sym) const {<br>
> uint32_t Index = this->getSectionIndex(Sym);<br>
> if (Index >= this->Sections.size())<br>
> fatal(toString(this) + ": invalid section index: " + Twine(Index));<br>
> @@ -559,7 +553,7 @@ InputSectionBase *elf::ObjectFile<ELFT>:<br>
> }<br>
><br>
> template <class ELFT><br>
> -SymbolBody *elf::ObjectFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {<br>
> +SymbolBody *ObjFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {<br>
> int Binding = Sym->getBinding();<br>
> InputSectionBase *Sec = getSection(*Sym);<br>
><br>
> @@ -965,13 +959,13 @@ InputFile *elf::createObjectFile(MemoryB<br>
><br>
> switch (getELFKind(MB)) {<br>
> case ELF32LEKind:<br>
> - return make<ObjectFile<ELF32LE>>(MB, ArchiveName);<br>
> + return make<ObjFile<ELF32LE>>(MB, ArchiveName);<br>
> case ELF32BEKind:<br>
> - return make<ObjectFile<ELF32BE>>(MB, ArchiveName);<br>
> + return make<ObjFile<ELF32BE>>(MB, ArchiveName);<br>
> case ELF64LEKind:<br>
> - return make<ObjectFile<ELF64LE>>(MB, ArchiveName);<br>
> + return make<ObjFile<ELF64LE>>(MB, ArchiveName);<br>
> case ELF64BEKind:<br>
> - return make<ObjectFile<ELF64BE>>(MB, ArchiveName);<br>
> + return make<ObjFile<ELF64BE>>(MB, ArchiveName);<br>
> default:<br>
> llvm_unreachable("getELFKind");<br>
> }<br>
> @@ -992,26 +986,26 @@ InputFile *elf::createSharedFile(MemoryB<br>
> }<br>
> }<br>
><br>
> -MemoryBufferRef LazyObjectFile::getBuffer() {<br>
> +MemoryBufferRef LazyObjFile::getBuffer() {<br>
> if (Seen)<br>
> return MemoryBufferRef();<br>
> Seen = true;<br>
> return MB;<br>
> }<br>
><br>
> -InputFile *LazyObjectFile::fetch() {<br>
> +InputFile *LazyObjFile::fetch() {<br>
> MemoryBufferRef MBRef = getBuffer();<br>
> if (MBRef.getBuffer().empty())<br>
> return nullptr;<br>
> return createObjectFile(MBRef, ArchiveName, OffsetInArchive);<br>
> }<br>
><br>
> -template <class ELFT> void LazyObjectFile::parse() {<br>
> +template <class ELFT> void LazyObjFile::parse() {<br>
> for (StringRef Sym : getSymbols())<br>
> Symtab->addLazyObject<ELFT>(Sym, *this);<br>
> }<br>
><br>
> -template <class ELFT> std::vector<StringRef> LazyObjectFile::getElfSymbols() {<br>
> +template <class ELFT> std::vector<StringRef> LazyObjFile::getElfSymbols() {<br>
> typedef typename ELFT::Shdr Elf_Shdr;<br>
> typedef typename ELFT::Sym Elf_Sym;<br>
> typedef typename ELFT::SymRange Elf_Sym_Range;<br>
> @@ -1036,7 +1030,7 @@ template <class ELFT> std::vector<String<br>
> return {};<br>
> }<br>
><br>
> -std::vector<StringRef> LazyObjectFile::getBitcodeSymbols() {<br>
> +std::vector<StringRef> LazyObjFile::getBitcodeSymbols() {<br>
> std::unique_ptr<lto::InputFile> Obj =<br>
> check(lto::InputFile::create(this->MB), toString(this));<br>
> std::vector<StringRef> V;<br>
> @@ -1047,7 +1041,7 @@ std::vector<StringRef> LazyObjectFile::g<br>
> }<br>
><br>
> // Returns a vector of globally-visible defined symbol names.<br>
> -std::vector<StringRef> LazyObjectFile::getSymbols() {<br>
> +std::vector<StringRef> LazyObjFile::getSymbols() {<br>
> if (isBitcode(this->MB))<br>
> return getBitcodeSymbols();<br>
><br>
> @@ -1075,20 +1069,20 @@ template void BitcodeFile::parse<ELF32BE<br>
> template void BitcodeFile::parse<ELF64LE>(DenseSet<CachedHashStringRef> &);<br>
> template void BitcodeFile::parse<ELF64BE>(DenseSet<CachedHashStringRef> &);<br>
><br>
> -template void LazyObjectFile::parse<ELF32LE>();<br>
> -template void LazyObjectFile::parse<ELF32BE>();<br>
> -template void LazyObjectFile::parse<ELF64LE>();<br>
> -template void LazyObjectFile::parse<ELF64BE>();<br>
> +template void LazyObjFile::parse<ELF32LE>();<br>
> +template void LazyObjFile::parse<ELF32BE>();<br>
> +template void LazyObjFile::parse<ELF64LE>();<br>
> +template void LazyObjFile::parse<ELF64BE>();<br>
><br>
> template class elf::ELFFileBase<ELF32LE>;<br>
> template class elf::ELFFileBase<ELF32BE>;<br>
> template class elf::ELFFileBase<ELF64LE>;<br>
> template class elf::ELFFileBase<ELF64BE>;<br>
><br>
> -template class elf::ObjectFile<ELF32LE>;<br>
> -template class elf::ObjectFile<ELF32BE>;<br>
> -template class elf::ObjectFile<ELF64LE>;<br>
> -template class elf::ObjectFile<ELF64BE>;<br>
> +template class elf::ObjFile<ELF32LE>;<br>
> +template class elf::ObjFile<ELF32BE>;<br>
> +template class elf::ObjFile<ELF64LE>;<br>
> +template class elf::ObjFile<ELF64BE>;<br>
><br>
> template class elf::SharedFile<ELF32LE>;<br>
> template class elf::SharedFile<ELF32BE>;<br>
><br>
> Modified: lld/trunk/ELF/InputFiles.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/InputFiles.h (original)<br>
> +++ lld/trunk/ELF/InputFiles.h Wed Jul 26 15:13:32 2017<br>
> @@ -138,7 +138,7 @@ protected:<br>
> };<br>
><br>
> // .o file.<br>
> -template <class ELFT> class ObjectFile : public ELFFileBase<ELFT> {<br>
> +template <class ELFT> class ObjFile : public ELFFileBase<ELFT> {<br>
> typedef ELFFileBase<ELFT> Base;<br>
> typedef typename ELFT::Rel Elf_Rel;<br>
> typedef typename ELFT::Rela Elf_Rela;<br>
> @@ -155,12 +155,12 @@ public:<br>
> return F->kind() == Base::ObjectKind;<br>
> }<br>
><br>
> - static std::vector<ObjectFile<ELFT> *> Instances;<br>
> + static std::vector<ObjFile<ELFT> *> Instances;<br>
><br>
> ArrayRef<SymbolBody *> getSymbols();<br>
> ArrayRef<SymbolBody *> getLocalSymbols();<br>
><br>
> - ObjectFile(MemoryBufferRef M, StringRef ArchiveName);<br>
> + ObjFile(MemoryBufferRef M, StringRef ArchiveName);<br>
> void parse(llvm::DenseSet<llvm::CachedHashStringRef> &ComdatGroups);<br>
><br>
> InputSectionBase *getSection(const Elf_Sym &Sym) const;<br>
> @@ -218,20 +218,19 @@ private:<br>
> llvm::once_flag InitDwarfLine;<br>
> };<br>
><br>
> -template <class ELFT><br>
> -std::vector<ObjectFile<ELFT> *> ObjectFile<ELFT>::Instances;<br>
> +template <class ELFT> std::vector<ObjFile<ELFT> *> ObjFile<ELFT>::Instances;<br>
><br>
> -// LazyObjectFile is analogous to ArchiveFile in the sense that<br>
> +// LazyObjFile is analogous to ArchiveFile in the sense that<br>
> // the file contains lazy symbols. The difference is that<br>
> -// LazyObjectFile wraps a single file instead of multiple files.<br>
> +// LazyObjFile wraps a single file instead of multiple files.<br>
> //<br>
> // This class is used for --start-lib and --end-lib options which<br>
> // instruct the linker to link object files between them with the<br>
> // archive file semantics.<br>
> -class LazyObjectFile : public InputFile {<br>
> +class LazyObjFile : public InputFile {<br>
> public:<br>
> - LazyObjectFile(MemoryBufferRef M, StringRef ArchiveName,<br>
> - uint64_t OffsetInArchive)<br>
> + LazyObjFile(MemoryBufferRef M, StringRef ArchiveName,<br>
> + uint64_t OffsetInArchive)<br>
> : InputFile(LazyObjectKind, M), OffsetInArchive(OffsetInArchive) {<br>
> this->ArchiveName = ArchiveName;<br>
> }<br>
><br>
> Modified: lld/trunk/ELF/InputSection.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/InputSection.cpp (original)<br>
> +++ lld/trunk/ELF/InputSection.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -45,7 +45,7 @@ std::string lld::toString(const InputSec<br>
> }<br>
><br>
> template <class ELFT><br>
> -static ArrayRef<uint8_t> getSectionContents(elf::ObjectFile<ELFT> *File,<br>
> +static ArrayRef<uint8_t> getSectionContents(ObjFile<ELFT> *File,<br>
> const typename ELFT::Shdr *Hdr) {<br>
> if (!File || Hdr->sh_type == SHT_NOBITS)<br>
> return makeArrayRef<uint8_t>(nullptr, Hdr->sh_size);<br>
> @@ -102,7 +102,7 @@ static uint64_t getType(uint64_t Type, S<br>
> }<br>
><br>
> template <class ELFT><br>
> -InputSectionBase::InputSectionBase(elf::ObjectFile<ELFT> *File,<br>
> +InputSectionBase::InputSectionBase(ObjFile<ELFT> *File,<br>
> const typename ELFT::Shdr *Hdr,<br>
> StringRef Name, Kind SectionKind)<br>
> : InputSectionBase(File, getFlags(Hdr->sh_flags),<br>
> @@ -246,7 +246,7 @@ std::string InputSectionBase::getLocatio<br>
> // Returns an empty string if there's no way to get line info.<br>
> template <class ELFT> std::string InputSectionBase::getSrcMsg(uint64_t Offset) {<br>
> // Synthetic sections don't have input files.<br>
> - elf::ObjectFile<ELFT> *File = getFile<ELFT>();<br>
> + ObjFile<ELFT> *File = getFile<ELFT>();<br>
> if (!File)<br>
> return "";<br>
><br>
> @@ -275,7 +275,7 @@ template <class ELFT> std::string InputS<br>
> // path/to/foo.o:(function bar) in archive path/to/bar.a<br>
> template <class ELFT> std::string InputSectionBase::getObjMsg(uint64_t Off) {<br>
> // Synthetic sections don't have input files.<br>
> - elf::ObjectFile<ELFT> *File = getFile<ELFT>();<br>
> + ObjFile<ELFT> *File = getFile<ELFT>();<br>
> if (!File)<br>
> return ("(internal):(" + Name + "+0x" + utohexstr(Off) + ")").str();<br>
> std::string Filename = File->getName();<br>
> @@ -304,8 +304,8 @@ InputSection::InputSection(uint64_t Flag<br>
> Name, K) {}<br>
><br>
> template <class ELFT><br>
> -InputSection::InputSection(elf::ObjectFile<ELFT> *F,<br>
> - const typename ELFT::Shdr *Header, StringRef Name)<br>
> +InputSection::InputSection(ObjFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> + StringRef Name)<br>
> : InputSectionBase(F, Header, Name, InputSectionBase::Regular) {}<br>
><br>
> bool InputSection::classof(const SectionBase *S) {<br>
> @@ -663,8 +663,8 @@ void InputSection::relocateNonAlloc(uint<br>
> }<br>
> }<br>
><br>
> -template <class ELFT> elf::ObjectFile<ELFT> *InputSectionBase::getFile() const {<br>
> - return cast_or_null<elf::ObjectFile<ELFT>>(File);<br>
> +template <class ELFT> ObjFile<ELFT> *InputSectionBase::getFile() const {<br>
> + return cast_or_null<ObjFile<ELFT>>(File);<br>
> }<br>
><br>
> template <class ELFT><br>
> @@ -776,7 +776,7 @@ void InputSection::replace(InputSection<br>
> }<br>
><br>
> template <class ELFT><br>
> -EhInputSection::EhInputSection(elf::ObjectFile<ELFT> *F,<br>
> +EhInputSection::EhInputSection(ObjFile<ELFT> *F,<br>
> const typename ELFT::Shdr *Header,<br>
> StringRef Name)<br>
> : InputSectionBase(F, Header, Name, InputSectionBase::EHFrame) {<br>
> @@ -893,7 +893,7 @@ void MergeInputSection::splitNonStrings(<br>
> }<br>
><br>
> template <class ELFT><br>
> -MergeInputSection::MergeInputSection(elf::ObjectFile<ELFT> *F,<br>
> +MergeInputSection::MergeInputSection(ObjFile<ELFT> *F,<br>
> const typename ELFT::Shdr *Header,<br>
> StringRef Name)<br>
> : InputSectionBase(F, Header, Name, InputSectionBase::Merge) {}<br>
> @@ -982,14 +982,14 @@ uint64_t MergeInputSection::getOffset(ui<br>
> return Piece.OutputOff + Addend;<br>
> }<br>
><br>
> -template InputSection::InputSection(elf::ObjectFile<ELF32LE> *,<br>
> - const ELF32LE::Shdr *, StringRef);<br>
> -template InputSection::InputSection(elf::ObjectFile<ELF32BE> *,<br>
> - const ELF32BE::Shdr *, StringRef);<br>
> -template InputSection::InputSection(elf::ObjectFile<ELF64LE> *,<br>
> - const ELF64LE::Shdr *, StringRef);<br>
> -template InputSection::InputSection(elf::ObjectFile<ELF64BE> *,<br>
> - const ELF64BE::Shdr *, StringRef);<br>
> +template InputSection::InputSection(ObjFile<ELF32LE> *, const ELF32LE::Shdr *,<br>
> + StringRef);<br>
> +template InputSection::InputSection(ObjFile<ELF32BE> *, const ELF32BE::Shdr *,<br>
> + StringRef);<br>
> +template InputSection::InputSection(ObjFile<ELF64LE> *, const ELF64LE::Shdr *,<br>
> + StringRef);<br>
> +template InputSection::InputSection(ObjFile<ELF64BE> *, const ELF64BE::Shdr *,<br>
> + StringRef);<br>
><br>
> template std::string InputSectionBase::getLocation<ELF32LE>(uint64_t);<br>
> template std::string InputSectionBase::getLocation<ELF32BE>(uint64_t);<br>
> @@ -1011,27 +1011,27 @@ template void InputSection::writeTo<ELF3<br>
> template void InputSection::writeTo<ELF64LE>(uint8_t *);<br>
> template void InputSection::writeTo<ELF64BE>(uint8_t *);<br>
><br>
> -template elf::ObjectFile<ELF32LE> *InputSectionBase::getFile<ELF32LE>() const;<br>
> -template elf::ObjectFile<ELF32BE> *InputSectionBase::getFile<ELF32BE>() const;<br>
> -template elf::ObjectFile<ELF64LE> *InputSectionBase::getFile<ELF64LE>() const;<br>
> -template elf::ObjectFile<ELF64BE> *InputSectionBase::getFile<ELF64BE>() const;<br>
> +template ObjFile<ELF32LE> *InputSectionBase::getFile<ELF32LE>() const;<br>
> +template ObjFile<ELF32BE> *InputSectionBase::getFile<ELF32BE>() const;<br>
> +template ObjFile<ELF64LE> *InputSectionBase::getFile<ELF64LE>() const;<br>
> +template ObjFile<ELF64BE> *InputSectionBase::getFile<ELF64BE>() const;<br>
><br>
> -template MergeInputSection::MergeInputSection(elf::ObjectFile<ELF32LE> *,<br>
> +template MergeInputSection::MergeInputSection(ObjFile<ELF32LE> *,<br>
> const ELF32LE::Shdr *, StringRef);<br>
> -template MergeInputSection::MergeInputSection(elf::ObjectFile<ELF32BE> *,<br>
> +template MergeInputSection::MergeInputSection(ObjFile<ELF32BE> *,<br>
> const ELF32BE::Shdr *, StringRef);<br>
> -template MergeInputSection::MergeInputSection(elf::ObjectFile<ELF64LE> *,<br>
> +template MergeInputSection::MergeInputSection(ObjFile<ELF64LE> *,<br>
> const ELF64LE::Shdr *, StringRef);<br>
> -template MergeInputSection::MergeInputSection(elf::ObjectFile<ELF64BE> *,<br>
> +template MergeInputSection::MergeInputSection(ObjFile<ELF64BE> *,<br>
> const ELF64BE::Shdr *, StringRef);<br>
><br>
> -template EhInputSection::EhInputSection(elf::ObjectFile<ELF32LE> *,<br>
> +template EhInputSection::EhInputSection(ObjFile<ELF32LE> *,<br>
> const ELF32LE::Shdr *, StringRef);<br>
> -template EhInputSection::EhInputSection(elf::ObjectFile<ELF32BE> *,<br>
> +template EhInputSection::EhInputSection(ObjFile<ELF32BE> *,<br>
> const ELF32BE::Shdr *, StringRef);<br>
> -template EhInputSection::EhInputSection(elf::ObjectFile<ELF64LE> *,<br>
> +template EhInputSection::EhInputSection(ObjFile<ELF64LE> *,<br>
> const ELF64LE::Shdr *, StringRef);<br>
> -template EhInputSection::EhInputSection(elf::ObjectFile<ELF64BE> *,<br>
> +template EhInputSection::EhInputSection(ObjFile<ELF64BE> *,<br>
> const ELF64BE::Shdr *, StringRef);<br>
><br>
> template void EhInputSection::split<ELF32LE>();<br>
><br>
> Modified: lld/trunk/ELF/InputSection.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/InputSection.h (original)<br>
> +++ lld/trunk/ELF/InputSection.h Wed Jul 26 15:13:32 2017<br>
> @@ -32,7 +32,7 @@ class DefinedRegular;<br>
> class SyntheticSection;<br>
> template <class ELFT> class EhFrameSection;<br>
> class MergeSyntheticSection;<br>
> -template <class ELFT> class ObjectFile;<br>
> +template <class ELFT> class ObjFile;<br>
> class OutputSection;<br>
><br>
> // This is the base class of all sections that lld handles. Some are sections in<br>
> @@ -113,7 +113,7 @@ public:<br>
> }<br>
><br>
> template <class ELFT><br>
> - InputSectionBase(ObjectFile<ELFT> *File, const typename ELFT::Shdr *Header,<br>
> + InputSectionBase(ObjFile<ELFT> *File, const typename ELFT::Shdr *Header,<br>
> StringRef Name, Kind SectionKind);<br>
><br>
> InputSectionBase(InputFile *File, uint64_t Flags, uint32_t Type,<br>
> @@ -157,7 +157,7 @@ public:<br>
> // Returns the size of this section (even if this is a common or BSS.)<br>
> size_t getSize() const;<br>
><br>
> - template <class ELFT> ObjectFile<ELFT> *getFile() const;<br>
> + template <class ELFT> ObjFile<ELFT> *getFile() const;<br>
><br>
> template <class ELFT> llvm::object::ELFFile<ELFT> getObj() const {<br>
> return getFile<ELFT>()->getObj();<br>
> @@ -204,7 +204,7 @@ static_assert(sizeof(SectionPiece) == 2<br>
> class MergeInputSection : public InputSectionBase {<br>
> public:<br>
> template <class ELFT><br>
> - MergeInputSection(ObjectFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> + MergeInputSection(ObjFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> StringRef Name);<br>
> static bool classof(const SectionBase *S);<br>
> void splitIntoPieces();<br>
> @@ -273,7 +273,7 @@ struct EhSectionPiece : public SectionPi<br>
> class EhInputSection : public InputSectionBase {<br>
> public:<br>
> template <class ELFT><br>
> - EhInputSection(ObjectFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> + EhInputSection(ObjFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> StringRef Name);<br>
> static bool classof(const SectionBase *S);<br>
> template <class ELFT> void split();<br>
> @@ -295,7 +295,7 @@ public:<br>
> InputSection(uint64_t Flags, uint32_t Type, uint32_t Alignment,<br>
> ArrayRef<uint8_t> Data, StringRef Name, Kind K = Regular);<br>
> template <class ELFT><br>
> - InputSection(ObjectFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> + InputSection(ObjFile<ELFT> *F, const typename ELFT::Shdr *Header,<br>
> StringRef Name);<br>
><br>
> // Write this section to a mmap'ed file, assuming Buf is pointing to<br>
><br>
> Modified: lld/trunk/ELF/LinkerScript.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/LinkerScript.cpp (original)<br>
> +++ lld/trunk/ELF/LinkerScript.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -1028,7 +1028,7 @@ static void finalizeShtGroup(OutputSecti<br>
><br>
> // sh_info then contain index of an entry in symbol table section which<br>
> // provides signature of the section group.<br>
> - elf::ObjectFile<ELFT> *Obj = Sections[0]->getFile<ELFT>();<br>
> + ObjFile<ELFT> *Obj = Sections[0]->getFile<ELFT>();<br>
> ArrayRef<SymbolBody *> Symbols = Obj->getSymbols();<br>
> OS->Info = InX::SymTab->getSymbolIndex(Symbols[Sections[0]->Info - 1]);<br>
> }<br>
><br>
> Modified: lld/trunk/ELF/MapFile.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/MapFile.cpp (original)<br>
> +++ lld/trunk/ELF/MapFile.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -51,7 +51,7 @@ static std::string indent(int Depth) { r<br>
> // Returns a list of all symbols that we want to print out.<br>
> template <class ELFT> std::vector<DefinedRegular *> getSymbols() {<br>
> std::vector<DefinedRegular *> V;<br>
> - for (elf::ObjectFile<ELFT> *File : elf::ObjectFile<ELFT>::Instances)<br>
> + for (ObjFile<ELFT> *File : ObjFile<ELFT>::Instances)<br>
> for (SymbolBody *B : File->getSymbols())<br>
> if (B->File == File && !B->isSection())<br>
> if (auto *Sym = dyn_cast<DefinedRegular>(B))<br>
><br>
> Modified: lld/trunk/ELF/OutputSections.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/OutputSections.h (original)<br>
> +++ lld/trunk/ELF/OutputSections.h Wed Jul 26 15:13:32 2017<br>
> @@ -29,7 +29,7 @@ class InputSection;<br>
> class InputSectionBase;<br>
> class MergeInputSection;<br>
> class OutputSection;<br>
> -template <class ELFT> class ObjectFile;<br>
> +template <class ELFT> class ObjFile;<br>
> template <class ELFT> class SharedFile;<br>
> class SharedSymbol;<br>
> class DefinedRegular;<br>
><br>
> Modified: lld/trunk/ELF/SymbolTable.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/SymbolTable.cpp (original)<br>
> +++ lld/trunk/ELF/SymbolTable.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -74,7 +74,7 @@ template <class ELFT> void SymbolTable::<br>
> }<br>
><br>
> // Lazy object file<br>
> - if (auto *F = dyn_cast<LazyObjectFile>(File)) {<br>
> + if (auto *F = dyn_cast<LazyObjFile>(File)) {<br>
> F->parse<ELFT>();<br>
> return;<br>
> }<br>
> @@ -101,8 +101,8 @@ template <class ELFT> void SymbolTable::<br>
> }<br>
><br>
> // Regular object file<br>
> - auto *F = cast<ObjectFile<ELFT>>(File);<br>
> - ObjectFile<ELFT>::Instances.push_back(F);<br>
> + auto *F = cast<ObjFile<ELFT>>(File);<br>
> + ObjFile<ELFT>::Instances.push_back(F);<br>
> F->parse(ComdatGroups);<br>
> }<br>
><br>
> @@ -123,10 +123,10 @@ template <class ELFT> void SymbolTable::<br>
> LTO->add(*F);<br>
><br>
> for (InputFile *File : LTO->compile()) {<br>
> - ObjectFile<ELFT> *Obj = cast<ObjectFile<ELFT>>(File);<br>
> + ObjFile<ELFT> *Obj = cast<ObjFile<ELFT>>(File);<br>
> DenseSet<CachedHashStringRef> DummyGroups;<br>
> Obj->parse(DummyGroups);<br>
> - ObjectFile<ELFT>::Instances.push_back(Obj);<br>
> + ObjFile<ELFT>::Instances.push_back(Obj);<br>
> }<br>
> }<br>
><br>
> @@ -564,7 +564,7 @@ Symbol *SymbolTable::addLazyArchive(Arch<br>
> }<br>
><br>
> template <class ELFT><br>
> -void SymbolTable::addLazyObject(StringRef Name, LazyObjectFile &Obj) {<br>
> +void SymbolTable::addLazyObject(StringRef Name, LazyObjFile &Obj) {<br>
> Symbol *S;<br>
> bool WasInserted;<br>
> std::tie(S, WasInserted) = insert(Name);<br>
> @@ -833,10 +833,10 @@ template Symbol *<br>
> SymbolTable::addLazyArchive<ELF64BE>(ArchiveFile *,<br>
> const object::Archive::Symbol);<br>
><br>
> -template void SymbolTable::addLazyObject<ELF32LE>(StringRef, LazyObjectFile &);<br>
> -template void SymbolTable::addLazyObject<ELF32BE>(StringRef, LazyObjectFile &);<br>
> -template void SymbolTable::addLazyObject<ELF64LE>(StringRef, LazyObjectFile &);<br>
> -template void SymbolTable::addLazyObject<ELF64BE>(StringRef, LazyObjectFile &);<br>
> +template void SymbolTable::addLazyObject<ELF32LE>(StringRef, LazyObjFile &);<br>
> +template void SymbolTable::addLazyObject<ELF32BE>(StringRef, LazyObjFile &);<br>
> +template void SymbolTable::addLazyObject<ELF64LE>(StringRef, LazyObjFile &);<br>
> +template void SymbolTable::addLazyObject<ELF64BE>(StringRef, LazyObjFile &);<br>
><br>
> template void SymbolTable::addShared<ELF32LE>(SharedFile<ELF32LE> *, StringRef,<br>
> const typename ELF32LE::Sym &,<br>
><br>
> Modified: lld/trunk/ELF/SymbolTable.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SymbolTable.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/SymbolTable.h (original)<br>
> +++ lld/trunk/ELF/SymbolTable.h Wed Jul 26 15:13:32 2017<br>
> @@ -68,7 +68,7 @@ public:<br>
><br>
> template <class ELFT><br>
> Symbol *addLazyArchive(ArchiveFile *F, const llvm::object::Archive::Symbol S);<br>
> - template <class ELFT> void addLazyObject(StringRef Name, LazyObjectFile &Obj);<br>
> + template <class ELFT> void addLazyObject(StringRef Name, LazyObjFile &Obj);<br>
><br>
> Symbol *addBitcode(StringRef Name, uint8_t Binding, uint8_t StOther,<br>
> uint8_t Type, bool CanOmitFromDynSym, BitcodeFile *File);<br>
><br>
> Modified: lld/trunk/ELF/Symbols.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/Symbols.cpp (original)<br>
> +++ lld/trunk/ELF/Symbols.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -325,7 +325,7 @@ LazyArchive::LazyArchive(ArchiveFile &Fi<br>
> this->File = &File;<br>
> }<br>
><br>
> -LazyObject::LazyObject(StringRef Name, LazyObjectFile &File, uint8_t Type)<br>
> +LazyObject::LazyObject(StringRef Name, LazyObjFile &File, uint8_t Type)<br>
> : Lazy(LazyObjectKind, Name, Type) {<br>
> this->File = &File;<br>
> }<br>
><br>
> Modified: lld/trunk/ELF/Symbols.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/Symbols.h (original)<br>
> +++ lld/trunk/ELF/Symbols.h Wed Jul 26 15:13:32 2017<br>
> @@ -28,8 +28,8 @@ namespace elf {<br>
> class ArchiveFile;<br>
> class BitcodeFile;<br>
> class InputFile;<br>
> -class LazyObjectFile;<br>
> -template <class ELFT> class ObjectFile;<br>
> +class LazyObjFile;<br>
> +template <class ELFT> class ObjFile;<br>
> class OutputSection;<br>
> template <class ELFT> class SharedFile;<br>
><br>
> @@ -292,13 +292,13 @@ private:<br>
> // --start-lib and --end-lib options.<br>
> class LazyObject : public Lazy {<br>
> public:<br>
> - LazyObject(StringRef Name, LazyObjectFile &File, uint8_t Type);<br>
> + LazyObject(StringRef Name, LazyObjFile &File, uint8_t Type);<br>
><br>
> static bool classof(const SymbolBody *S) {<br>
> return S->kind() == LazyObjectKind;<br>
> }<br>
><br>
> - LazyObjectFile *file() { return (LazyObjectFile *)this->File; }<br>
> + LazyObjFile *file() { return (LazyObjFile *)this->File; }<br>
> InputFile *fetch();<br>
> };<br>
><br>
><br>
> Modified: lld/trunk/ELF/SyntheticSections.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/SyntheticSections.cpp (original)<br>
> +++ lld/trunk/ELF/SyntheticSections.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -108,7 +108,7 @@ template <class ELFT> MergeInputSection<br>
> Hdr.sh_addralign = 1;<br>
><br>
> auto *Ret =<br>
> - make<MergeInputSection>((ObjectFile<ELFT> *)nullptr, &Hdr, ".comment");<br>
> + make<MergeInputSection>((ObjFile<ELFT> *)nullptr, &Hdr, ".comment");<br>
> Ret->Data = getVersion();<br>
> Ret->splitIntoPieces();<br>
> return Ret;<br>
> @@ -1815,7 +1815,7 @@ static GdbIndexChunk readDwarf(DWARFCont<br>
> template <class ELFT> GdbIndexSection *elf::createGdbIndex() {<br>
> std::vector<GdbIndexChunk> Chunks;<br>
> for (InputSection *Sec : getDebugInfoSections()) {<br>
> - elf::ObjectFile<ELFT> *F = Sec->getFile<ELFT>();<br>
> + ObjFile<ELFT> *F = Sec->getFile<ELFT>();<br>
> DWARFContext Dwarf(make_unique<LLDDwarfObj<ELFT>>(F));<br>
> Chunks.push_back(readDwarf(Dwarf, Sec));<br>
> }<br>
><br>
> Modified: lld/trunk/ELF/Writer.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/Writer.cpp (original)<br>
> +++ lld/trunk/ELF/Writer.cpp Wed Jul 26 15:13:32 2017<br>
> @@ -471,7 +471,7 @@ static bool includeInSymtab(const Symbol<br>
> template <class ELFT> void Writer<ELFT>::copyLocalSymbols() {<br>
> if (!InX::SymTab)<br>
> return;<br>
> - for (elf::ObjectFile<ELFT> *F : elf::ObjectFile<ELFT>::Instances) {<br>
> + for (ObjFile<ELFT> *F : ObjFile<ELFT>::Instances) {<br>
> for (SymbolBody *B : F->getLocalSymbols()) {<br>
> if (!B->IsLocal)<br>
> fatal(toString(F) +<br>
> @@ -893,7 +893,7 @@ template <class ELFT> static void sortBy<br>
><br>
> // Build a map from sections to their priorities.<br>
> DenseMap<SectionBase *, int> SectionOrder;<br>
> - for (elf::ObjectFile<ELFT> *File : elf::ObjectFile<ELFT>::Instances) {<br>
> + for (ObjFile<ELFT> *File : ObjFile<ELFT>::Instances) {<br>
> for (SymbolBody *Body : File->getSymbols()) {<br>
> auto *D = dyn_cast<DefinedRegular>(Body);<br>
> if (!D || !D->Section)<br>
><br>
> Modified: lld/trunk/ELF/Writer.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.h?rev=309199&r1=309198&r2=309199&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.h?rev=309199&r1=309198&r2=309199&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/ELF/Writer.h (original)<br>
> +++ lld/trunk/ELF/Writer.h Wed Jul 26 15:13:32 2017<br>
> @@ -20,7 +20,7 @@ namespace elf {<br>
> class InputFile;<br>
> class OutputSection;<br>
> class InputSectionBase;<br>
> -template <class ELFT> class ObjectFile;<br>
> +template <class ELFT> class ObjFile;<br>
> class SymbolTable;<br>
> template <class ELFT> void writeResult();<br>
> template <class ELFT> void markLive();<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>