[Lldb-commits] [lldb] r334198 - DIERef: move trivial constructors into the header
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 7 07:03:30 PDT 2018
Author: labath
Date: Thu Jun 7 07:03:30 2018
New Revision: 334198
URL: http://llvm.org/viewvc/llvm-project?rev=334198&view=rev
Log:
DIERef: move trivial constructors into the header
This enables more inlining/optimization opportunities for a fairly
critical class.
NFCI
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp
lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.h
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp?rev=334198&r1=334197&r2=334198&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.cpp Thu Jun 7 07:03:30 2018
@@ -14,11 +14,6 @@
#include "SymbolFileDWARF.h"
#include "SymbolFileDWARFDebugMap.h"
-DIERef::DIERef()
- : cu_offset(DW_INVALID_OFFSET), die_offset(DW_INVALID_OFFSET) {}
-
-DIERef::DIERef(dw_offset_t c, dw_offset_t d) : cu_offset(c), die_offset(d) {}
-
DIERef::DIERef(lldb::user_id_t uid, SymbolFileDWARF *dwarf)
: cu_offset(DW_INVALID_OFFSET), die_offset(uid & 0xffffffff) {
SymbolFileDWARFDebugMap *debug_map = dwarf->GetDebugMapSymfile();
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.h?rev=334198&r1=334197&r2=334198&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DIERef.h Thu Jun 7 07:03:30 2018
@@ -17,9 +17,9 @@ class DWARFFormValue;
class SymbolFileDWARF;
struct DIERef {
- DIERef();
+ DIERef() = default;
- DIERef(dw_offset_t c, dw_offset_t d);
+ DIERef(dw_offset_t c, dw_offset_t d) : cu_offset(c), die_offset(d) {}
//----------------------------------------------------------------------
// In order to properly decode a lldb::user_id_t back into a DIERef we
@@ -45,8 +45,8 @@ struct DIERef {
bool operator<(const DIERef &ref) { return die_offset < ref.die_offset; }
- dw_offset_t cu_offset;
- dw_offset_t die_offset;
+ dw_offset_t cu_offset = DW_INVALID_OFFSET;
+ dw_offset_t die_offset = DW_INVALID_OFFSET;
};
typedef std::vector<DIERef> DIEArray;
More information about the lldb-commits
mailing list