[Lldb-commits] [PATCH] D74690: Separate DIERef vs. user_id_t: GetForwardDeclClangTypeToDie()

2020-02-16 Thread Jan Kratochvil via Phabricator via lldb-commits
jankratochvil created this revision.
jankratochvil added reviewers: labath, clayborg.
jankratochvil added a project: LLDB.
Herald added a reviewer: shafik.

Reasons are the same as: D74637 


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74690

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h


Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -322,7 +322,7 @@
   typedef llvm::DenseMap
   DIEToClangType;
-  typedef llvm::DenseMap
+  typedef llvm::DenseMap
   ClangTypeToDIE;
 
   DISALLOW_COPY_AND_ASSIGN(SymbolFileDWARF);
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1723,7 +1723,7 @@
   clang_type.GetOpaqueQualType();
   dwarf->GetForwardDeclClangTypeToDie()
   [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
-  die.GetID();
+  *die.GetDIERef();
   m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
 }
   }
Index: lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
@@ -34,6 +34,8 @@
 assert(this->dwo_num() == dwo_num && "Dwo number out of range?");
   }
 
+  DIERef() {}
+
   llvm::Optional dwo_num() const {
 if (m_dwo_num_valid)
   return m_dwo_num;
@@ -58,7 +60,7 @@
   uint32_t m_dwo_num : 30;
   uint32_t m_dwo_num_valid : 1;
   uint32_t m_section : 1;
-  dw_offset_t m_die_offset;
+  dw_offset_t m_die_offset = DW_INVALID_OFFSET;
 };
 static_assert(sizeof(DIERef) == 8, "");
 


Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -322,7 +322,7 @@
   typedef llvm::DenseMap
   DIEToClangType;
-  typedef llvm::DenseMap
+  typedef llvm::DenseMap
   ClangTypeToDIE;
 
   DISALLOW_COPY_AND_ASSIGN(SymbolFileDWARF);
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1723,7 +1723,7 @@
   clang_type.GetOpaqueQualType();
   dwarf->GetForwardDeclClangTypeToDie()
   [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
-  die.GetID();
+  *die.GetDIERef();
   m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
 }
   }
Index: lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DIERef.h
@@ -34,6 +34,8 @@
 assert(this->dwo_num() == dwo_num && "Dwo number out of range?");
   }
 
+  DIERef() {}
+
   llvm::Optional dwo_num() const {
 if (m_dwo_num_valid)
   return m_dwo_num;
@@ -58,7 +60,7 @@
   uint32_t m_dwo_num : 30;
   uint32_t m_dwo_num_valid : 1;
   uint32_t m_section : 1;
-  dw_offset_t m_die_offset;
+  dw_offset_t m_die_offset = DW_INVALID_OFFSET;
 };
 static_assert(sizeof(DIERef) == 8, "");
 
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D73534: [DebugInfo] Enable the debug entry values feature by default

2020-02-16 Thread David Stenberg via Phabricator via lldb-commits
dstenb added inline comments.



Comment at: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:870
 if (MI->isCandidateForCallSiteEntry() &&
-DAG->getTarget().Options.EnableDebugEntryValues)
+DAG->getTarget().Options.SupportsDebugEntryValues)
   MF.addCallArgsForwardingRegs(MI, DAG->getSDCallSiteInfo(Node));

djtodoro wrote:
> dstenb wrote:
> > I'm sorry for commenting on this so late, but when now adapting this patch 
> > for our downstream target, for which we will not enable call site info by 
> > default yet, I noticed that the call site information wasn't added. I think 
> > that this should be `ShouldEmitDebugEntryValues()`.
> I thought to restrict the production of the call site info here and only to 
> allow a hand-made testing, but I think you are right, we should use the 
> `ShouldEmitDebugEntryValues()`. I'll update the patch, thanks!
Thanks! It is perhaps a bit of a corner case, and we're moving towards enabling 
call site info by default, but I guess this might be useful when experimenting 
with adding call site info for other targets in the future.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73534/new/

https://reviews.llvm.org/D73534



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D73067: [lldb/CMake] Auto-generate the Initialize and Terminate calls for plugin

2020-02-16 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

This looks good. Thanks for working on this.




Comment at: lldb/source/Plugins/CMakeLists.txt:45
+
+set_property(GLOBAL PROPERTY LLDB_PLUGINS_INCLUDE_DIR 
${CMAKE_CURRENT_BINARY_DIR})

I guess you don't need to set this now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73067/new/

https://reviews.llvm.org/D73067



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits