diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-08-19 00:13:54 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-08-19 00:13:54 +0000 |
| commit | 42479e02caccc8716418a10955371363105d1bf6 (patch) | |
| tree | 642a22afb4be8c69bbfdac6c74075b25bde616cb | |
| parent | be709f2c19bc59df5dbbd877f782bf7cc47fc663 (diff) | |
| download | bcm5719-llvm-42479e02caccc8716418a10955371363105d1bf6.tar.gz bcm5719-llvm-42479e02caccc8716418a10955371363105d1bf6.zip | |
Rename {Lazy,}ObjectKind -> {Lazy,}ObjKind.
I renamed corresponding classes in r309199 but forgot to rename enums
at the moment. Rename them now to make them consistent.
llvm-svn: 311214
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 2 | ||||
| -rw-r--r-- | lld/ELF/InputFiles.h | 20 | ||||
| -rw-r--r-- | lld/ELF/SymbolTable.cpp | 2 |
3 files changed, 10 insertions, 14 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 26caa4c2f5a..368e111bfd7 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -157,7 +157,7 @@ void ELFFileBase<ELFT>::initSymtab(ArrayRef<Elf_Shdr> Sections, template <class ELFT> ObjFile<ELFT>::ObjFile(MemoryBufferRef M, StringRef ArchiveName) - : ELFFileBase<ELFT>(Base::ObjectKind, M) { + : ELFFileBase<ELFT>(Base::ObjKind, M) { this->ArchiveName = ArchiveName; } diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index 75cc0587dc9..a6720e609a8 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -63,9 +63,9 @@ llvm::Optional<MemoryBufferRef> readFile(StringRef Path); class InputFile { public: enum Kind { - ObjectKind, + ObjKind, SharedKind, - LazyObjectKind, + LazyObjKind, ArchiveKind, BitcodeKind, BinaryKind, @@ -79,14 +79,14 @@ public: // Returns sections. It is a runtime error to call this function // on files that don't have the notion of sections. ArrayRef<InputSectionBase *> getSections() const { - assert(FileKind == ObjectKind || FileKind == BinaryKind); + assert(FileKind == ObjKind || FileKind == BinaryKind); return Sections; } // Returns object file symbols. It is a runtime error to call this // function on files of other types. ArrayRef<SymbolBody *> getSymbols() { - assert(FileKind == ObjectKind || FileKind == BitcodeKind || + assert(FileKind == ObjKind || FileKind == BitcodeKind || FileKind == ArchiveKind); return Symbols; } @@ -124,7 +124,7 @@ public: ELFFileBase(Kind K, MemoryBufferRef M); static bool classof(const InputFile *F) { Kind K = F->kind(); - return K == ObjectKind || K == SharedKind; + return K == ObjKind || K == SharedKind; } llvm::object::ELFFile<ELFT> getObj() const { @@ -160,9 +160,7 @@ template <class ELFT> class ObjFile : public ELFFileBase<ELFT> { ArrayRef<Elf_Word> getShtGroupEntries(const Elf_Shdr &Sec); public: - static bool classof(const InputFile *F) { - return F->kind() == Base::ObjectKind; - } + static bool classof(const InputFile *F) { return F->kind() == Base::ObjKind; } static std::vector<ObjFile<ELFT> *> Instances; @@ -236,13 +234,11 @@ class LazyObjFile : public InputFile { public: LazyObjFile(MemoryBufferRef M, StringRef ArchiveName, uint64_t OffsetInArchive) - : InputFile(LazyObjectKind, M), OffsetInArchive(OffsetInArchive) { + : InputFile(LazyObjKind, M), OffsetInArchive(OffsetInArchive) { this->ArchiveName = ArchiveName; } - static bool classof(const InputFile *F) { - return F->kind() == LazyObjectKind; - } + static bool classof(const InputFile *F) { return F->kind() == LazyObjKind; } template <class ELFT> void parse(); MemoryBufferRef getBuffer(); diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index c2a5f96d6de..ec8ae5d75bb 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -250,7 +250,7 @@ std::pair<Symbol *, bool> SymbolTable::insert(StringRef Name, uint8_t Type, uint8_t Visibility, bool CanOmitFromDynSym, InputFile *File) { - bool IsUsedInRegularObj = !File || File->kind() == InputFile::ObjectKind; + bool IsUsedInRegularObj = !File || File->kind() == InputFile::ObjKind; Symbol *S; bool WasInserted; std::tie(S, WasInserted) = insert(Name); |

