[llvm] r241277 - Use default member initializes. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jul 2 08:48:05 PDT 2015
Author: rafael
Date: Thu Jul 2 10:48:05 2015
New Revision: 241277
URL: http://llvm.org/viewvc/llvm-project?rev=241277&view=rev
Log:
Use default member initializes. NFC.
Modified:
llvm/trunk/include/llvm/Object/ELF.h
Modified: llvm/trunk/include/llvm/Object/ELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=241277&r1=241276&r2=241277&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELF.h (original)
+++ llvm/trunk/include/llvm/Object/ELF.h Thu Jul 2 10:48:05 2015
@@ -170,17 +170,17 @@ private:
}
const Elf_Ehdr *Header;
- const Elf_Shdr *SectionHeaderTable;
- StringRef DotShstrtab; // Section header string table.
- StringRef DotStrtab; // Symbol header string table.
- const Elf_Shdr *dot_symtab_sec; // Symbol table section.
+ const Elf_Shdr *SectionHeaderTable = nullptr;
+ StringRef DotShstrtab; // Section header string table.
+ StringRef DotStrtab; // Symbol header string table.
+ const Elf_Shdr *dot_symtab_sec = nullptr; // Symbol table section.
- const Elf_Shdr *SymbolTableSectionHeaderIndex;
+ const Elf_Shdr *SymbolTableSectionHeaderIndex = nullptr;
DenseMap<const Elf_Sym *, ELF::Elf64_Word> ExtendedSymbolTable;
- const Elf_Shdr *dot_gnu_version_sec; // .gnu.version
- const Elf_Shdr *dot_gnu_version_r_sec; // .gnu.version_r
- const Elf_Shdr *dot_gnu_version_d_sec; // .gnu.version_d
+ const Elf_Shdr *dot_gnu_version_sec = nullptr; // .gnu.version
+ const Elf_Shdr *dot_gnu_version_r_sec = nullptr; // .gnu.version_r
+ const Elf_Shdr *dot_gnu_version_d_sec = nullptr; // .gnu.version_d
/// \brief Represents a region described by entries in the .dynamic table.
struct DynRegionInfo {
@@ -201,7 +201,7 @@ private:
// Pointer to SONAME entry in dynamic string table
// This is set the first time getLoadName is called.
- mutable const char *dt_soname;
+ mutable const char *dt_soname = nullptr;
// Records for each version index the corresponding Verdef or Vernaux entry.
// This is filled the first time LoadVersionMap() is called.
@@ -564,10 +564,7 @@ typename ELFFile<ELFT>::uintX_t ELFFile<
template <class ELFT>
ELFFile<ELFT>::ELFFile(StringRef Object, std::error_code &EC)
- : Buf(Object), SectionHeaderTable(nullptr), dot_symtab_sec(nullptr),
- SymbolTableSectionHeaderIndex(nullptr), dot_gnu_version_sec(nullptr),
- dot_gnu_version_r_sec(nullptr), dot_gnu_version_d_sec(nullptr),
- dt_soname(nullptr) {
+ : Buf(Object) {
const uint64_t FileSize = Buf.size();
if (sizeof(Elf_Ehdr) > FileSize) {
More information about the llvm-commits
mailing list