<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Nov 18, 2016 at 10:10 AM Eugene Zelenko 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">Author: eugenezelenko<br class="gmail_msg">
Date: Fri Nov 18 12:00:19 2016<br class="gmail_msg">
New Revision: 287355<br class="gmail_msg">
<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=287355&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=287355&view=rev</a><br class="gmail_msg">
Log:<br class="gmail_msg">
[DebugInfo] Fix some Clang-tidy modernize-use-default, modernize-use-equal-delete and Include What You Use warnings; other minor fixes (NFC).<br class="gmail_msg">
<br class="gmail_msg">
Per Zachary Turner and Mehdi Amini suggestion to make only post-commit reviews.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Modified:<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/DIContext.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/SequencedItemStream.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/PDB/PDBContext.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h<br class="gmail_msg">
llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -10,22 +10,26 @@<br class="gmail_msg">
#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPETABLEBUILDER_H<br class="gmail_msg">
#define LLVM_DEBUGINFO_CODEVIEW_TYPETABLEBUILDER_H<br class="gmail_msg">
<br class="gmail_msg">
+#include "llvm/ADT/ArrayRef.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/CodeView/CodeView.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/CodeView/TypeIndex.h"<br class="gmail_msg">
#include "llvm/DebugInfo/CodeView/TypeSerializer.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/CodeView/TypeRecord.h"<br class="gmail_msg">
#include "llvm/Support/Allocator.h"<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
+#include <algorithm><br class="gmail_msg">
+#include <cassert><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
+#include <type_traits><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
-<br class="gmail_msg">
namespace codeview {<br class="gmail_msg">
<br class="gmail_msg">
class TypeTableBuilder {<br class="gmail_msg">
private:<br class="gmail_msg">
- TypeTableBuilder(const TypeTableBuilder &) = delete;<br class="gmail_msg">
- TypeTableBuilder &operator=(const TypeTableBuilder &) = delete;<br class="gmail_msg">
-<br class="gmail_msg">
- TypeIndex handleError(llvm::Error EC) const {<br class="gmail_msg">
+ TypeIndex handleError(Error EC) const {<br class="gmail_msg">
assert(false && "Couldn't write Type!");<br class="gmail_msg">
- llvm::consumeError(std::move(EC));<br class="gmail_msg">
+ consumeError(std::move(EC));<br class="gmail_msg">
return TypeIndex();<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
@@ -35,6 +39,8 @@ private:<br class="gmail_msg">
public:<br class="gmail_msg">
explicit TypeTableBuilder(BumpPtrAllocator &Allocator)<br class="gmail_msg">
: Allocator(Allocator), Serializer(Allocator) {}<br class="gmail_msg">
+ TypeTableBuilder(const TypeTableBuilder &) = delete;<br class="gmail_msg">
+ TypeTableBuilder &operator=(const TypeTableBuilder &) = delete;<br class="gmail_msg">
<br class="gmail_msg">
bool empty() const { return Serializer.records().empty(); }<br class="gmail_msg">
<br class="gmail_msg">
@@ -116,7 +122,8 @@ public:<br class="gmail_msg">
return Index;<br class="gmail_msg">
}<br class="gmail_msg">
};<br class="gmail_msg">
-}<br class="gmail_msg">
-}<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+} // end namespace codeview<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_CODEVIEW_TYPETABLEBUILDER_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/DIContext.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/DIContext.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/DIContext.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -17,9 +17,12 @@<br class="gmail_msg">
<br class="gmail_msg">
#include "llvm/ADT/SmallVector.h"<br class="gmail_msg">
#include "llvm/Object/ObjectFile.h"<br class="gmail_msg">
-#include "llvm/Support/Casting.h"<br class="gmail_msg">
-#include "llvm/Support/DataTypes.h"<br class="gmail_msg">
+#include <cassert><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
+#include <memory><br class="gmail_msg">
#include <string><br class="gmail_msg">
+#include <tuple><br class="gmail_msg">
+#include <utility><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
<br class="gmail_msg">
@@ -53,19 +56,24 @@ typedef SmallVector<std::pair<uint64_t,<br class="gmail_msg">
/// DIInliningInfo - a format-neutral container for inlined code description.<br class="gmail_msg">
class DIInliningInfo {<br class="gmail_msg">
SmallVector<DILineInfo, 4> Frames;<br class="gmail_msg">
- public:<br class="gmail_msg">
- DIInliningInfo() {} </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br class="gmail_msg">
+public:<br class="gmail_msg">
+ DIInliningInfo() = default;<br class="gmail_msg"></blockquote><div><br></div><div>I'd just remove this ^ entirely, it's the implicit/default.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br class="gmail_msg">
DILineInfo getFrame(unsigned Index) const {<br class="gmail_msg">
assert(Index < Frames.size());<br class="gmail_msg">
return Frames[Index];<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
DILineInfo *getMutableFrame(unsigned Index) {<br class="gmail_msg">
assert(Index < Frames.size());<br class="gmail_msg">
return &Frames[Index];<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
uint32_t getNumberOfFrames() const {<br class="gmail_msg">
return Frames.size();<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
void addFrame(const DILineInfo &Frame) {<br class="gmail_msg">
Frames.push_back(Frame);<br class="gmail_msg">
}<br class="gmail_msg">
@@ -138,10 +146,11 @@ public:<br class="gmail_msg">
CK_DWARF,<br class="gmail_msg">
CK_PDB<br class="gmail_msg">
};<br class="gmail_msg">
- DIContextKind getKind() const { return Kind; }<br class="gmail_msg">
<br class="gmail_msg">
DIContext(DIContextKind K) : Kind(K) {}<br class="gmail_msg">
- virtual ~DIContext() {}<br class="gmail_msg">
+ virtual ~DIContext() = default;<br class="gmail_msg">
+<br class="gmail_msg">
+ DIContextKind getKind() const { return Kind; }<br class="gmail_msg">
<br class="gmail_msg">
virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All,<br class="gmail_msg">
bool DumpEH = false, bool SummarizeTypes = false) = 0;<br class="gmail_msg">
@@ -152,6 +161,7 @@ public:<br class="gmail_msg">
uint64_t Size, DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0;<br class="gmail_msg">
virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address,<br class="gmail_msg">
DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0;<br class="gmail_msg">
+<br class="gmail_msg">
private:<br class="gmail_msg">
const DIContextKind Kind;<br class="gmail_msg">
};<br class="gmail_msg">
@@ -197,6 +207,6 @@ public:<br class="gmail_msg">
virtual std::unique_ptr<LoadedObjectInfo> clone() const = 0;<br class="gmail_msg">
};<br class="gmail_msg">
<br class="gmail_msg">
-}<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_DICONTEXT_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -10,19 +10,31 @@<br class="gmail_msg">
#ifndef LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H<br class="gmail_msg">
#define LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H<br class="gmail_msg">
<br class="gmail_msg">
+#include "llvm/ADT/DenseMap.h"<br class="gmail_msg">
+#include "llvm/ADT/iterator_range.h"<br class="gmail_msg">
#include "llvm/ADT/MapVector.h"<br class="gmail_msg">
+#include "llvm/ADT/SmallString.h"<br class="gmail_msg">
#include "llvm/ADT/SmallVector.h"<br class="gmail_msg">
+#include "llvm/ADT/StringRef.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DIContext.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFDebugAranges.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFDebugMacro.h"<br class="gmail_msg">
-#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFGdbIndex.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFSection.h"<br class="gmail_msg">
#include "llvm/DebugInfo/DWARF/DWARFTypeUnit.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/DWARF/DWARFUnit.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"<br class="gmail_msg">
+#include "llvm/Object/ObjectFile.h"<br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
+#include <deque><br class="gmail_msg">
+#include <map><br class="gmail_msg">
+#include <memory><br class="gmail_msg">
+#include <utility><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
<br class="gmail_msg">
@@ -31,14 +43,13 @@ namespace llvm {<br class="gmail_msg">
// dwarf where we expect relocated values. This adds a bit of complexity to the<br class="gmail_msg">
// dwarf parsing/extraction at the benefit of not allocating memory for the<br class="gmail_msg">
// entire size of the debug info sections.<br class="gmail_msg">
-typedef DenseMap<uint64_t, std::pair<uint8_t, int64_t> > RelocAddrMap;<br class="gmail_msg">
+typedef DenseMap<uint64_t, std::pair<uint8_t, int64_t>> RelocAddrMap;<br class="gmail_msg"></blockquote><div><br>In the future, it's best not to reformat the whole file - use tools/clang/tools/clang-format/git-clang-format to only reformat the parts you change.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
/// DWARFContext<br class="gmail_msg">
/// This data structure is the top level entity that deals with dwarf debug<br class="gmail_msg">
/// information parsing. The actual data is supplied through pure virtual<br class="gmail_msg">
/// methods that a concrete implementation provides.<br class="gmail_msg">
class DWARFContext : public DIContext {<br class="gmail_msg">
-<br class="gmail_msg">
DWARFUnitSection<DWARFCompileUnit> CUs;<br class="gmail_msg">
std::deque<DWARFUnitSection<DWARFTypeUnit>> TUs;<br class="gmail_msg">
std::unique_ptr<DWARFUnitIndex> CUIndex;<br class="gmail_msg">
@@ -57,9 +68,6 @@ class DWARFContext : public DIContext {<br class="gmail_msg">
std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO;<br class="gmail_msg">
std::unique_ptr<DWARFDebugLocDWO> LocDWO;<br class="gmail_msg">
<br class="gmail_msg">
- DWARFContext(DWARFContext &) = delete;<br class="gmail_msg">
- DWARFContext &operator=(DWARFContext &) = delete;<br class="gmail_msg">
-<br class="gmail_msg">
/// Read compile units from the debug_info section (if necessary)<br class="gmail_msg">
/// and store them in CUs.<br class="gmail_msg">
void parseCompileUnits();<br class="gmail_msg">
@@ -78,6 +86,8 @@ class DWARFContext : public DIContext {<br class="gmail_msg">
<br class="gmail_msg">
public:<br class="gmail_msg">
DWARFContext() : DIContext(CK_DWARF) {}<br class="gmail_msg">
+ DWARFContext(DWARFContext &) = delete;<br class="gmail_msg">
+ DWARFContext &operator=(DWARFContext &) = delete;<br class="gmail_msg"></blockquote><div><br>I'm assuming these are the defaults? ^ could they be omitted? (though, really, these ops should be protected defaulted in the base class, and the derived class should be final, otherwise there's risk of slicing - but the ops could still be implicit in the final derived class)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
static bool classof(const DIContext *DICtx) {<br class="gmail_msg">
return DICtx->getKind() == CK_DWARF;<br class="gmail_msg">
@@ -229,6 +239,7 @@ public:<br class="gmail_msg">
static bool isSupportedVersion(unsigned version) {<br class="gmail_msg">
return version == 2 || version == 3 || version == 4 || version == 5;<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
private:<br class="gmail_msg">
/// Return the compile unit that includes an offset (relative to .debug_info).<br class="gmail_msg">
DWARFCompileUnit *getCompileUnitForOffset(uint32_t Offset);<br class="gmail_msg">
@@ -243,6 +254,7 @@ private:<br class="gmail_msg">
/// pointers to it.<br class="gmail_msg">
class DWARFContextInMemory : public DWARFContext {<br class="gmail_msg">
virtual void anchor();<br class="gmail_msg">
+<br class="gmail_msg">
bool IsLittleEndian;<br class="gmail_msg">
uint8_t AddressSize;<br class="gmail_msg">
DWARFSection InfoSection;<br class="gmail_msg">
@@ -284,6 +296,7 @@ class DWARFContextInMemory : public DWAR<br class="gmail_msg">
public:<br class="gmail_msg">
DWARFContextInMemory(const object::ObjectFile &Obj,<br class="gmail_msg">
const LoadedObjectInfo *L = nullptr);<br class="gmail_msg">
+<br class="gmail_msg">
bool isLittleEndian() const override { return IsLittleEndian; }<br class="gmail_msg">
uint8_t getAddressSize() const override { return AddressSize; }<br class="gmail_msg">
const DWARFSection &getInfoSection() override { return InfoSection; }<br class="gmail_msg">
@@ -327,6 +340,6 @@ public:<br class="gmail_msg">
StringRef getTUIndexSection() override { return TUIndexSection; }<br class="gmail_msg">
};<br class="gmail_msg">
<br class="gmail_msg">
-}<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+#endif // LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -12,7 +12,7 @@<br class="gmail_msg">
<br class="gmail_msg">
#include "llvm/ADT/SmallVector.h"<br class="gmail_msg">
#include "llvm/Support/DataExtractor.h"<br class="gmail_msg">
-#include "llvm/Support/Dwarf.h"<br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
<br class="gmail_msg">
@@ -46,13 +46,14 @@ class DWARFDebugMacro {<br class="gmail_msg">
MacroList Macros;<br class="gmail_msg">
<br class="gmail_msg">
public:<br class="gmail_msg">
- DWARFDebugMacro() {}<br class="gmail_msg">
+ DWARFDebugMacro() = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br class="gmail_msg">
/// Print the macro list found within the debug_macinfo section.<br class="gmail_msg">
void dump(raw_ostream &OS) const;<br class="gmail_msg">
/// Parse the debug_macinfo section accessible via the 'data' parameter.<br class="gmail_msg">
void parse(DataExtractor data);<br class="gmail_msg">
};<br class="gmail_msg">
<br class="gmail_msg">
-}<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/ByteStream.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -17,16 +17,17 @@<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
#include "llvm/Support/FileOutputBuffer.h"<br class="gmail_msg">
#include "llvm/Support/MemoryBuffer.h"<br class="gmail_msg">
+#include <algorithm><br class="gmail_msg">
#include <cstdint><br class="gmail_msg">
+#include <cstring><br class="gmail_msg">
#include <memory><br class="gmail_msg">
-#include <type_traits><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
<br class="gmail_msg">
class ByteStream : public ReadableStream {<br class="gmail_msg">
public:<br class="gmail_msg">
- ByteStream() {}<br class="gmail_msg">
+ ByteStream() = default;<br class="gmail_msg">
explicit ByteStream(ArrayRef<uint8_t> Data) : Data(Data) {}<br class="gmail_msg">
explicit ByteStream(StringRef Data)<br class="gmail_msg">
: Data(Data.bytes_begin(), Data.bytes_end()) {}<br class="gmail_msg">
@@ -40,6 +41,7 @@ public:<br class="gmail_msg">
Buffer = Data.slice(Offset, Size);<br class="gmail_msg">
return Error::success();<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
Error readLongestContiguousChunk(uint32_t Offset,<br class="gmail_msg">
ArrayRef<uint8_t> &Buffer) const override {<br class="gmail_msg">
if (Offset >= Data.size())<br class="gmail_msg">
@@ -75,7 +77,7 @@ public:<br class="gmail_msg">
<br class="gmail_msg">
class MutableByteStream : public WritableStream {<br class="gmail_msg">
public:<br class="gmail_msg">
- MutableByteStream() {}<br class="gmail_msg">
+ MutableByteStream() = default;<br class="gmail_msg">
explicit MutableByteStream(MutableArrayRef<uint8_t> Data)<br class="gmail_msg">
: Data(Data), ImmutableStream(Data) {}<br class="gmail_msg">
<br class="gmail_msg">
@@ -83,6 +85,7 @@ public:<br class="gmail_msg">
ArrayRef<uint8_t> &Buffer) const override {<br class="gmail_msg">
return ImmutableStream.readBytes(Offset, Size, Buffer);<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
Error readLongestContiguousChunk(uint32_t Offset,<br class="gmail_msg">
ArrayRef<uint8_t> &Buffer) const override {<br class="gmail_msg">
return ImmutableStream.readLongestContiguousChunk(Offset, Buffer);<br class="gmail_msg">
@@ -142,6 +145,7 @@ public:<br class="gmail_msg">
ArrayRef<uint8_t> &Buffer) const override {<br class="gmail_msg">
return Impl.readBytes(Offset, Size, Buffer);<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
Error readLongestContiguousChunk(uint32_t Offset,<br class="gmail_msg">
ArrayRef<uint8_t> &Buffer) const override {<br class="gmail_msg">
return Impl.readLongestContiguousChunk(Offset, Buffer);<br class="gmail_msg">
@@ -152,13 +156,13 @@ public:<br class="gmail_msg">
Error writeBytes(uint32_t Offset, ArrayRef<uint8_t> Data) const override {<br class="gmail_msg">
return Impl.writeBytes(Offset, Data);<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
Error commit() const override { return Impl.commit(); }<br class="gmail_msg">
<br class="gmail_msg">
private:<br class="gmail_msg">
StreamImpl Impl;<br class="gmail_msg">
};<br class="gmail_msg">
<br class="gmail_msg">
-<br class="gmail_msg">
} // end namespace msf<br class="gmail_msg">
} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/IMSFFile.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -11,19 +11,16 @@<br class="gmail_msg">
#define LLVM_DEBUGINFO_MSF_IMSFFILE_H<br class="gmail_msg">
<br class="gmail_msg">
#include "llvm/ADT/ArrayRef.h"<br class="gmail_msg">
-#include "llvm/ADT/StringRef.h"<br class="gmail_msg">
-#include "llvm/DebugInfo/MSF/StreamArray.h"<br class="gmail_msg">
#include "llvm/Support/Endian.h"<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
-<br class="gmail_msg">
-#include <stdint.h><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
<br class="gmail_msg">
class IMSFFile {<br class="gmail_msg">
public:<br class="gmail_msg">
- virtual ~IMSFFile() {}<br class="gmail_msg">
+ virtual ~IMSFFile() = default;<br class="gmail_msg">
<br class="gmail_msg">
virtual uint32_t getBlockSize() const = 0;<br class="gmail_msg">
virtual uint32_t getBlockCount() const = 0;<br class="gmail_msg">
@@ -38,7 +35,8 @@ public:<br class="gmail_msg">
virtual Error setBlockData(uint32_t BlockIndex, uint32_t Offset,<br class="gmail_msg">
ArrayRef<uint8_t> Data) const = 0;<br class="gmail_msg">
};<br class="gmail_msg">
-}<br class="gmail_msg">
-}<br class="gmail_msg">
+<br class="gmail_msg">
+} // end namespace msf<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
#endif // LLVM_DEBUGINFO_MSF_IMSFFILE_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/SequencedItemStream.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/SequencedItemStream.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/SequencedItemStream.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/SequencedItemStream.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/SequencedItemStream.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -14,12 +14,12 @@<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/MSFError.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamInterface.h"<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
+#include <cstddef><br class="gmail_msg">
#include <cstdint><br class="gmail_msg">
-#include <memory><br class="gmail_msg">
-#include <type_traits><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
+<br class="gmail_msg">
template <typename T> struct SequencedItemTraits {<br class="gmail_msg">
static size_t length(const T &Item) = delete;<br class="gmail_msg">
static ArrayRef<uint8_t> bytes(const T &Item) = delete;<br class="gmail_msg">
@@ -37,7 +37,7 @@ template <typename T> struct SequencedIt<br class="gmail_msg">
template <typename T, typename Traits = SequencedItemTraits<T>><br class="gmail_msg">
class SequencedItemStream : public ReadableStream {<br class="gmail_msg">
public:<br class="gmail_msg">
- SequencedItemStream() {}<br class="gmail_msg">
+ SequencedItemStream() = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
Error readBytes(uint32_t Offset, uint32_t Size,<br class="gmail_msg">
ArrayRef<uint8_t> &Buffer) const override {<br class="gmail_msg">
@@ -83,8 +83,10 @@ private:<br class="gmail_msg">
return make_error<MSFError>(msf_error_code::insufficient_buffer);<br class="gmail_msg">
return CurrentIndex;<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
ArrayRef<T> Items;<br class="gmail_msg">
};<br class="gmail_msg">
+<br class="gmail_msg">
} // end namespace msf<br class="gmail_msg">
} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamArray.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -1,4 +1,4 @@<br class="gmail_msg">
-//===- StreamArray.h - Array backed by an arbitrary stream ----------------===//<br class="gmail_msg">
+//===- StreamArray.h - Array backed by an arbitrary stream ------*- C++ -*-===//<br class="gmail_msg">
//<br class="gmail_msg">
// The LLVM Compiler Infrastructure<br class="gmail_msg">
//<br class="gmail_msg">
@@ -10,12 +10,11 @@<br class="gmail_msg">
#ifndef LLVM_DEBUGINFO_MSF_STREAMARRAY_H<br class="gmail_msg">
#define LLVM_DEBUGINFO_MSF_STREAMARRAY_H<br class="gmail_msg">
<br class="gmail_msg">
-#include "llvm/DebugInfo/MSF/SequencedItemStream.h"<br class="gmail_msg">
+#include "llvm/ADT/ArrayRef.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamRef.h"<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
-<br class="gmail_msg">
-#include <functional><br class="gmail_msg">
-#include <type_traits><br class="gmail_msg">
+#include <cassert><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
@@ -76,13 +75,14 @@ template <typename ValueType, typename E<br class="gmail_msg">
<br class="gmail_msg">
template <typename ValueType,<br class="gmail_msg">
typename Extractor = VarStreamArrayExtractor<ValueType>><br class="gmail_msg">
+<br class="gmail_msg">
class VarStreamArray {<br class="gmail_msg">
friend class VarStreamArrayIterator<ValueType, Extractor>;<br class="gmail_msg">
<br class="gmail_msg">
public:<br class="gmail_msg">
typedef VarStreamArrayIterator<ValueType, Extractor> Iterator;<br class="gmail_msg">
<br class="gmail_msg">
- VarStreamArray() {}<br class="gmail_msg">
+ VarStreamArray() = default;<br class="gmail_msg">
explicit VarStreamArray(const Extractor &E) : E(E) {}<br class="gmail_msg">
<br class="gmail_msg">
explicit VarStreamArray(ReadableStreamRef Stream) : Stream(Stream) {}<br class="gmail_msg">
@@ -125,9 +125,9 @@ public:<br class="gmail_msg">
}<br class="gmail_msg">
}<br class="gmail_msg">
}<br class="gmail_msg">
- VarStreamArrayIterator() {}<br class="gmail_msg">
+ VarStreamArrayIterator() = default;<br class="gmail_msg">
explicit VarStreamArrayIterator(const Extractor &E) : Extract(E) {}<br class="gmail_msg">
- ~VarStreamArrayIterator() {}<br class="gmail_msg">
+ ~VarStreamArrayIterator() = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default dtor? (just omit it entirely)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
bool operator==(const IterType &R) const {<br class="gmail_msg">
if (Array && R.Array) {<br class="gmail_msg">
@@ -206,7 +206,7 @@ template <typename T> class FixedStreamA<br class="gmail_msg">
friend class FixedStreamArrayIterator<T>;<br class="gmail_msg">
<br class="gmail_msg">
public:<br class="gmail_msg">
- FixedStreamArray() : Stream() {}<br class="gmail_msg">
+ FixedStreamArray() = default;<br class="gmail_msg">
FixedStreamArray(ReadableStreamRef Stream) : Stream(Stream) {<br class="gmail_msg">
assert(Stream.getLength() % sizeof(T) == 0);<br class="gmail_msg">
}<br class="gmail_msg">
@@ -229,6 +229,7 @@ public:<br class="gmail_msg">
FixedStreamArrayIterator<T> begin() const {<br class="gmail_msg">
return FixedStreamArrayIterator<T>(*this, 0);<br class="gmail_msg">
}<br class="gmail_msg">
+<br class="gmail_msg">
FixedStreamArrayIterator<T> end() const {<br class="gmail_msg">
return FixedStreamArrayIterator<T>(*this, size());<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamInterface.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -19,7 +19,7 @@ namespace msf {<br class="gmail_msg">
<br class="gmail_msg">
class ReadableStream {<br class="gmail_msg">
public:<br class="gmail_msg">
- virtual ~ReadableStream() {}<br class="gmail_msg">
+ virtual ~ReadableStream() = default;<br class="gmail_msg">
<br class="gmail_msg">
// Given an offset into the stream and a number of bytes, attempt to read<br class="gmail_msg">
// the bytes and set the output ArrayRef to point to a reference into the<br class="gmail_msg">
@@ -37,7 +37,7 @@ public:<br class="gmail_msg">
<br class="gmail_msg">
class WritableStream : public ReadableStream {<br class="gmail_msg">
public:<br class="gmail_msg">
- virtual ~WritableStream() {}<br class="gmail_msg">
+ ~WritableStream() override = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
// Attempt to write the given bytes into the stream at the desired offset.<br class="gmail_msg">
// This will always necessitate a copy. Cannot shrink or grow the stream,<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamRef.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -10,11 +10,16 @@<br class="gmail_msg">
#ifndef LLVM_DEBUGINFO_MSF_STREAMREF_H<br class="gmail_msg">
#define LLVM_DEBUGINFO_MSF_STREAMREF_H<br class="gmail_msg">
<br class="gmail_msg">
+#include "llvm/ADT/ArrayRef.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/MSFError.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamInterface.h"<br class="gmail_msg">
+#include "llvm/Support/Error.h"<br class="gmail_msg">
+#include <algorithm><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
+<br class="gmail_msg">
template <class StreamType, class RefType> class StreamRefBase {<br class="gmail_msg">
public:<br class="gmail_msg">
StreamRefBase() : Stream(nullptr), ViewOffset(0), Length(0) {}<br class="gmail_msg">
@@ -62,7 +67,7 @@ protected:<br class="gmail_msg">
class ReadableStreamRef<br class="gmail_msg">
: public StreamRefBase<ReadableStream, ReadableStreamRef> {<br class="gmail_msg">
public:<br class="gmail_msg">
- ReadableStreamRef() : StreamRefBase() {}<br class="gmail_msg">
+ ReadableStreamRef() = default;<br class="gmail_msg">
ReadableStreamRef(const ReadableStream &Stream)<br class="gmail_msg">
: StreamRefBase(Stream, 0, Stream.getLength()) {}<br class="gmail_msg">
ReadableStreamRef(const ReadableStream &Stream, uint32_t Offset,<br class="gmail_msg">
@@ -104,7 +109,7 @@ public:<br class="gmail_msg">
class WritableStreamRef<br class="gmail_msg">
: public StreamRefBase<WritableStream, WritableStreamRef> {<br class="gmail_msg">
public:<br class="gmail_msg">
- WritableStreamRef() : StreamRefBase() {}<br class="gmail_msg">
+ WritableStreamRef() = default;<br class="gmail_msg">
WritableStreamRef(const WritableStream &Stream)<br class="gmail_msg">
: StreamRefBase(Stream, 0, Stream.getLength()) {}<br class="gmail_msg">
WritableStreamRef(const WritableStream &Stream, uint32_t Offset,<br class="gmail_msg">
@@ -124,7 +129,7 @@ public:<br class="gmail_msg">
Error commit() const { return Stream->commit(); }<br class="gmail_msg">
};<br class="gmail_msg">
<br class="gmail_msg">
-} // namespace msf<br class="gmail_msg">
-} // namespace llvm<br class="gmail_msg">
+} // end namespace msf<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
#endif // LLVM_DEBUGINFO_MSF_STREAMREF_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/MSF/StreamWriter.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -11,21 +11,20 @@<br class="gmail_msg">
#define LLVM_DEBUGINFO_MSF_STREAMWRITER_H<br class="gmail_msg">
<br class="gmail_msg">
#include "llvm/ADT/ArrayRef.h"<br class="gmail_msg">
+#include "llvm/ADT/StringRef.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/MSFError.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamArray.h"<br class="gmail_msg">
-#include "llvm/DebugInfo/MSF/StreamInterface.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamRef.h"<br class="gmail_msg">
-#include "llvm/Support/Endian.h"<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
-<br class="gmail_msg">
-#include <string><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
+#include <type_traits><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
<br class="gmail_msg">
class StreamWriter {<br class="gmail_msg">
public:<br class="gmail_msg">
- StreamWriter() {}<br class="gmail_msg">
+ StreamWriter() = default;<br class="gmail_msg">
explicit StreamWriter(WritableStreamRef Stream);<br class="gmail_msg">
<br class="gmail_msg">
Error writeBytes(ArrayRef<uint8_t> Buffer);<br class="gmail_msg">
@@ -57,7 +56,7 @@ public:<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
template <typename T> Error writeArray(ArrayRef<T> Array) {<br class="gmail_msg">
- if (Array.size() == 0)<br class="gmail_msg">
+ if (Array.empty())<br class="gmail_msg">
return Error::success();<br class="gmail_msg">
<br class="gmail_msg">
if (Array.size() > UINT32_MAX / sizeof(T))<br class="gmail_msg">
@@ -86,7 +85,8 @@ private:<br class="gmail_msg">
WritableStreamRef Stream;<br class="gmail_msg">
uint32_t Offset = 0;<br class="gmail_msg">
};<br class="gmail_msg">
-} // namespace msf<br class="gmail_msg">
-} // namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+} // end namespace msf<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
#endif // LLVM_DEBUGINFO_MSF_STREAMWRITER_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -10,8 +10,11 @@<br class="gmail_msg">
#ifndef LLVM_DEBUGINFO_PDB_CONCRETESYMBOLENUMERATOR_H<br class="gmail_msg">
#define LLVM_DEBUGINFO_PDB_CONCRETESYMBOLENUMERATOR_H<br class="gmail_msg">
<br class="gmail_msg">
-#include "IPDBEnumChildren.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"<br class="gmail_msg">
+#include "llvm/DebugInfo/PDB/PDBTypes.h"<br class="gmail_msg">
#include "llvm/Support/Casting.h"<br class="gmail_msg">
+#include <algorithm><br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
#include <memory><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
@@ -23,7 +26,7 @@ public:<br class="gmail_msg">
ConcreteSymbolEnumerator(std::unique_ptr<IPDBEnumSymbols> SymbolEnumerator)<br class="gmail_msg">
: Enumerator(std::move(SymbolEnumerator)) {}<br class="gmail_msg">
<br class="gmail_msg">
- ~ConcreteSymbolEnumerator() override {}<br class="gmail_msg">
+ ~ConcreteSymbolEnumerator() override = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
uint32_t getChildCount() const override {<br class="gmail_msg">
return Enumerator->getChildCount();<br class="gmail_msg">
@@ -55,7 +58,8 @@ private:<br class="gmail_msg">
<br class="gmail_msg">
std::unique_ptr<IPDBEnumSymbols> Enumerator;<br class="gmail_msg">
};<br class="gmail_msg">
-}<br class="gmail_msg">
-}<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+} // end namespace pdb<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_PDB_CONCRETESYMBOLENUMERATOR_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -10,7 +10,7 @@<br class="gmail_msg">
#ifndef LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H<br class="gmail_msg">
#define LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H<br class="gmail_msg">
<br class="gmail_msg">
-#include "PDBTypes.h"<br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
#include <memory><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
@@ -21,7 +21,7 @@ public:<br class="gmail_msg">
typedef std::unique_ptr<ChildType> ChildTypePtr;<br class="gmail_msg">
typedef IPDBEnumChildren<ChildType> MyType;<br class="gmail_msg">
<br class="gmail_msg">
- virtual ~IPDBEnumChildren() {}<br class="gmail_msg">
+ virtual ~IPDBEnumChildren() = default;<br class="gmail_msg">
<br class="gmail_msg">
virtual uint32_t getChildCount() const = 0;<br class="gmail_msg">
virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0;<br class="gmail_msg">
@@ -29,7 +29,8 @@ public:<br class="gmail_msg">
virtual void reset() = 0;<br class="gmail_msg">
virtual MyType *clone() const = 0;<br class="gmail_msg">
};<br class="gmail_msg">
-}<br class="gmail_msg">
-}<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+} // end namespace pdb<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/PDBContext.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBContext.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/PDBContext.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/PDB/PDBContext.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/PDB/PDBContext.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -12,14 +12,18 @@<br class="gmail_msg">
<br class="gmail_msg">
#include "llvm/DebugInfo/DIContext.h"<br class="gmail_msg">
#include "llvm/DebugInfo/PDB/IPDBSession.h"<br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
+#include <memory><br class="gmail_msg">
+#include <string><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
<br class="gmail_msg">
namespace object {<br class="gmail_msg">
class COFFObjectFile;<br class="gmail_msg">
- }<br class="gmail_msg">
+} // end namespace object<br class="gmail_msg">
+<br class="gmail_msg">
+namespace pdb {<br class="gmail_msg">
<br class="gmail_msg">
- namespace pdb {<br class="gmail_msg">
/// PDBContext<br class="gmail_msg">
/// This data structure is the top level entity that deals with PDB debug<br class="gmail_msg">
/// information parsing. This data structure exists only when there is a<br class="gmail_msg">
@@ -27,13 +31,11 @@ class COFFObjectFile;<br class="gmail_msg">
/// (e.g. PDB and DWARF). More control and power over the debug information<br class="gmail_msg">
/// access can be had by using the PDB interfaces directly.<br class="gmail_msg">
class PDBContext : public DIContext {<br class="gmail_msg">
-<br class="gmail_msg">
- PDBContext(PDBContext &) = delete;<br class="gmail_msg">
- PDBContext &operator=(PDBContext &) = delete;<br class="gmail_msg">
-<br class="gmail_msg">
public:<br class="gmail_msg">
PDBContext(const object::COFFObjectFile &Object,<br class="gmail_msg">
std::unique_ptr<IPDBSession> PDBSession);<br class="gmail_msg">
+ PDBContext(PDBContext &) = delete;<br class="gmail_msg">
+ PDBContext &operator=(PDBContext &) = delete;<br class="gmail_msg">
<br class="gmail_msg">
static bool classof(const DIContext *DICtx) {<br class="gmail_msg">
return DICtx->getKind() == CK_PDB;<br class="gmail_msg">
@@ -56,7 +58,9 @@ class COFFObjectFile;<br class="gmail_msg">
std::string getFunctionName(uint64_t Address, DINameKind NameKind) const;<br class="gmail_msg">
std::unique_ptr<IPDBSession> Session;<br class="gmail_msg">
};<br class="gmail_msg">
- }<br class="gmail_msg">
-}<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+} // end namespace pdb<br class="gmail_msg">
+<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_PDB_PDBCONTEXT_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -12,17 +12,19 @@<br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace pdb {<br class="gmail_msg">
+<br class="gmail_msg">
struct SectionContrib;<br class="gmail_msg">
struct SectionContrib2;<br class="gmail_msg">
<br class="gmail_msg">
class ISectionContribVisitor {<br class="gmail_msg">
public:<br class="gmail_msg">
- virtual ~ISectionContribVisitor() {}<br class="gmail_msg">
+ virtual ~ISectionContribVisitor() = default;<br class="gmail_msg">
<br class="gmail_msg">
virtual void visit(const SectionContrib &C) = 0;<br class="gmail_msg">
virtual void visit(const SectionContrib2 &C) = 0;<br class="gmail_msg">
};<br class="gmail_msg">
-} // namespace pdb<br class="gmail_msg">
-} // namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+} // end namespace pdb<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
#endif // LLVM_DEBUGINFO_PDB_RAW_ISECTIONCONTRIBVISITOR_H<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Raw/ModInfo.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -14,11 +14,12 @@<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamArray.h"<br class="gmail_msg">
#include "llvm/DebugInfo/MSF/StreamRef.h"<br class="gmail_msg">
#include "llvm/DebugInfo/PDB/Raw/RawTypes.h"<br class="gmail_msg">
-#include "llvm/Support/Endian.h"<br class="gmail_msg">
+#include "llvm/Support/Error.h"<br class="gmail_msg">
#include <cstdint><br class="gmail_msg">
#include <vector><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
+<br class="gmail_msg">
namespace pdb {<br class="gmail_msg">
<br class="gmail_msg">
class ModInfo {<br class="gmail_msg">
@@ -54,8 +55,7 @@ private:<br class="gmail_msg">
<br class="gmail_msg">
struct ModuleInfoEx {<br class="gmail_msg">
ModuleInfoEx(const ModInfo &Info) : Info(Info) {}<br class="gmail_msg">
- ModuleInfoEx(const ModuleInfoEx &Ex)<br class="gmail_msg">
- : Info(Ex.Info), SourceFiles(Ex.SourceFiles) {}<br class="gmail_msg">
+ ModuleInfoEx(const ModuleInfoEx &Ex) = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
ModInfo Info;<br class="gmail_msg">
std::vector<StringRef> SourceFiles;<br class="gmail_msg">
@@ -64,6 +64,7 @@ struct ModuleInfoEx {<br class="gmail_msg">
} // end namespace pdb<br class="gmail_msg">
<br class="gmail_msg">
namespace msf {<br class="gmail_msg">
+<br class="gmail_msg">
template <> struct VarStreamArrayExtractor<pdb::ModInfo> {<br class="gmail_msg">
Error operator()(ReadableStreamRef Stream, uint32_t &Length,<br class="gmail_msg">
pdb::ModInfo &Info) const {<br class="gmail_msg">
@@ -73,6 +74,7 @@ template <> struct VarStreamArrayExtract<br class="gmail_msg">
return Error::success();<br class="gmail_msg">
}<br class="gmail_msg">
};<br class="gmail_msg">
+<br class="gmail_msg">
} // end namespace msf<br class="gmail_msg">
<br class="gmail_msg">
} // end namespace llvm<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h?rev=287355&r1=287354&r2=287355&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h?rev=287355&r1=287354&r2=287355&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h (original)<br class="gmail_msg">
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Raw/TpiHashing.h Fri Nov 18 12:00:19 2016<br class="gmail_msg">
@@ -11,6 +11,7 @@<br class="gmail_msg">
#define LLVM_DEBUGINFO_PDB_TPIHASHING_H<br class="gmail_msg">
<br class="gmail_msg">
#include "llvm/ADT/Optional.h"<br class="gmail_msg">
+#include "llvm/ADT/StringExtras.h"<br class="gmail_msg">
#include "llvm/DebugInfo/CodeView/TypeIndex.h"<br class="gmail_msg">
#include "llvm/DebugInfo/CodeView/TypeRecord.h"<br class="gmail_msg">
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"<br class="gmail_msg">
@@ -18,12 +19,15 @@<br class="gmail_msg">
#include "llvm/DebugInfo/PDB/Raw/RawError.h"<br class="gmail_msg">
#include "llvm/Support/Endian.h"<br class="gmail_msg">
#include "llvm/Support/Error.h"<br class="gmail_msg">
+#include <cstdint><br class="gmail_msg">
+#include <string><br class="gmail_msg">
<br class="gmail_msg">
namespace llvm {<br class="gmail_msg">
namespace pdb {<br class="gmail_msg">
+<br class="gmail_msg">
class TpiHashUpdater : public codeview::TypeVisitorCallbacks {<br class="gmail_msg">
public:<br class="gmail_msg">
- TpiHashUpdater() {}<br class="gmail_msg">
+ TpiHashUpdater() = default;<br class="gmail_msg"></blockquote><div><br></div><div>Implicit default?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
#define TYPE_RECORD(EnumName, EnumVal, Name) \<br class="gmail_msg">
virtual Error visitKnownRecord(codeview::CVType &CVR, \<br class="gmail_msg">
@@ -84,7 +88,8 @@ private:<br class="gmail_msg">
uint32_t NumHashBuckets;<br class="gmail_msg">
uint32_t Index = -1;<br class="gmail_msg">
};<br class="gmail_msg">
-}<br class="gmail_msg">
-}<br class="gmail_msg">
<br class="gmail_msg">
-#endif<br class="gmail_msg">
+} // end namespace pdb<br class="gmail_msg">
+} // end namespace llvm<br class="gmail_msg">
+<br class="gmail_msg">
+#endif // LLVM_DEBUGINFO_PDB_TPIHASHING_H<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div></div>