[NFCI] Explicitly provide user-defined constructor for SectionRef
authorAlex Langford <apl@fb.com>
Tue, 13 Aug 2019 22:16:18 +0000 (22:16 +0000)
committerAlex Langford <apl@fb.com>
Tue, 13 Aug 2019 22:16:18 +0000 (22:16 +0000)
I am changing this to work around an issue that is being hit when
building with clang 3.8. Specifically, clang 3.8 requires that we have a user
defined default constructor for SectionRef for the default initialization of a
const SectionRef.

llvm-svn: 368758

llvm/tools/llvm-readobj/ELFDumper.cpp

index e5b6503..67ee182 100644 (file)
@@ -4713,7 +4713,7 @@ void DumpStyle<ELFT>::printRelocatableStackSizes(
   // Build a map between stack size sections and their corresponding relocation
   // sections.
   llvm::MapVector<SectionRef, SectionRef> StackSizeRelocMap;
-  const SectionRef NullSection;
+  const SectionRef NullSection{};
 
   for (const SectionRef &Sec : Obj->sections()) {
     StringRef SectionName;