[lld] r242098 - Fix warnings.
Michael J. Spencer
bigcheesegs at gmail.com
Mon Jul 13 18:02:38 PDT 2015
Author: mspencer
Date: Mon Jul 13 20:02:37 2015
New Revision: 242098
URL: http://llvm.org/viewvc/llvm-project?rev=242098&view=rev
Log:
Fix warnings.
Modified:
lld/trunk/ELF/Chunks.cpp
lld/trunk/ELF/InputFiles.cpp
Modified: lld/trunk/ELF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Chunks.cpp?rev=242098&r1=242097&r2=242098&view=diff
==============================================================================
--- lld/trunk/ELF/Chunks.cpp (original)
+++ lld/trunk/ELF/Chunks.cpp Mon Jul 13 20:02:37 2015
@@ -59,10 +59,6 @@ template <class ELFT> void SectionChunk<
// FIXME: Relocations
}
-static void add16(uint8_t *P, int16_t V) { write16le(P, read16le(P) + V); }
-static void add32(uint8_t *P, int32_t V) { write32le(P, read32le(P) + V); }
-static void add64(uint8_t *P, int64_t V) { write64le(P, read64le(P) + V); }
-
template <class ELFT>
void SectionChunk<ELFT>::applyReloc(uint8_t *Buf, const Elf_Rela *Rel) {
// FIXME: Relocations
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=242098&r1=242097&r2=242098&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Mon Jul 13 20:02:37 2015
@@ -91,7 +91,7 @@ template <class ELFT> std::error_code el
}
// Read section and symbol tables.
- if (EC = initializeChunks())
+ if ((EC = initializeChunks()))
return EC;
return initializeSymbols();
}
@@ -140,7 +140,7 @@ std::error_code elfv2::ObjectFile<ELFT>:
template <class ELFT>
std::error_code elfv2::ObjectFile<ELFT>::initializeSymbols() {
auto Syms = ELFObj->symbols();
- Syms = ELFFile<ELFT>::Elf_Sym_Range(Syms.begin() + 1, Syms.end());
+ Syms = typename ELFFile<ELFT>::Elf_Sym_Range(Syms.begin() + 1, Syms.end());
auto NumSymbols = std::distance(Syms.begin(), Syms.end());
SymbolBodies.reserve(NumSymbols + 1);
SparseSymbolBodies.resize(NumSymbols + 1);
More information about the llvm-commits
mailing list