diff options
Diffstat (limited to 'include/llvm/DebugInfo/DIContext.h')
-rw-r--r-- | include/llvm/DebugInfo/DIContext.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/include/llvm/DebugInfo/DIContext.h b/include/llvm/DebugInfo/DIContext.h index 804419c517df..e3386a8dcd24 100644 --- a/include/llvm/DebugInfo/DIContext.h +++ b/include/llvm/DebugInfo/DIContext.h @@ -1,4 +1,4 @@ -//===-- DIContext.h ---------------------------------------------*- C++ -*-===// +//===- DIContext.h ----------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -32,26 +32,28 @@ class raw_ostream; struct DILineInfo { std::string FileName; std::string FunctionName; - uint32_t Line; - uint32_t Column; + uint32_t Line = 0; + uint32_t Column = 0; + uint32_t StartLine = 0; // DWARF-specific. - uint32_t Discriminator; + uint32_t Discriminator = 0; - DILineInfo() - : FileName("<invalid>"), FunctionName("<invalid>"), Line(0), Column(0), - Discriminator(0) {} + DILineInfo() : FileName("<invalid>"), FunctionName("<invalid>") {} bool operator==(const DILineInfo &RHS) const { return Line == RHS.Line && Column == RHS.Column && - FileName == RHS.FileName && FunctionName == RHS.FunctionName; + FileName == RHS.FileName && FunctionName == RHS.FunctionName && + StartLine == RHS.StartLine && Discriminator == RHS.Discriminator; } bool operator!=(const DILineInfo &RHS) const { return !(*this == RHS); } bool operator<(const DILineInfo &RHS) const { - return std::tie(FileName, FunctionName, Line, Column) < - std::tie(RHS.FileName, RHS.FunctionName, RHS.Line, RHS.Column); + return std::tie(FileName, FunctionName, Line, Column, StartLine, + Discriminator) < + std::tie(RHS.FileName, RHS.FunctionName, RHS.Line, RHS.Column, + RHS.StartLine, RHS.Discriminator); } }; @@ -86,10 +88,10 @@ public: /// DIGlobal - container for description of a global variable. struct DIGlobal { std::string Name; - uint64_t Start; - uint64_t Size; + uint64_t Start = 0; + uint64_t Size = 0; - DIGlobal() : Name("<invalid>"), Start(0), Size(0) {} + DIGlobal() : Name("<invalid>") {} }; /// A DINameKind is passed to name search methods to specify a @@ -175,8 +177,8 @@ private: /// on the fly. class LoadedObjectInfo { protected: - LoadedObjectInfo(const LoadedObjectInfo &) = default; LoadedObjectInfo() = default; + LoadedObjectInfo(const LoadedObjectInfo &) = default; public: virtual ~LoadedObjectInfo() = default; |