[Lldb-commits] [PATCH] D115570: [lldb] Use `GNUInstallDirs` to support custom installation dirs.

2021-12-12 Thread John Ericson via Phabricator via lldb-commits
Ericson2314 added inline comments.



Comment at: lldb/cmake/modules/AddLLDB.cmake:1
+include(GNUInstallDirs)
 function(lldb_tablegen)

I think a problem with D115544 was that `AddLLVM` was assuming `GNUInstallDirs` 
yet downstream packages didn't yet include it.

By starting with "leaf" packages I side-step this issue somewhat, but I am 
still putting these here defensively so that downstream projects that might 
include these aren't broken, and the precedent is set.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115570

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


[Lldb-commits] [lldb] d2377f2 - Ensure newlines at the end of files (NFC)

2021-12-12 Thread Kazu Hirata via lldb-commits

Author: Kazu Hirata
Date: 2021-12-12T11:04:44-08:00
New Revision: d2377f24e13549f08bbddfe9af8e8b61e9528581

URL: 
https://github.com/llvm/llvm-project/commit/d2377f24e13549f08bbddfe9af8e8b61e9528581
DIFF: 
https://github.com/llvm/llvm-project/commit/d2377f24e13549f08bbddfe9af8e8b61e9528581.diff

LOG: Ensure newlines at the end of files (NFC)

Added: 


Modified: 
lldb/source/Plugins/Language/CPlusPlus/Generic.h
llvm/include/llvm/Analysis/NoInferenceModelRunner.h
llvm/lib/Analysis/NoInferenceModelRunner.cpp
llvm/lib/MC/MCInstrAnalysis.cpp
llvm/lib/Support/AArch64TargetParser.cpp
llvm/lib/Target/CSKY/CSKYCallingConv.td
llvm/lib/Target/CSKY/CSKYFrameLowering.cpp
llvm/lib/Target/CSKY/CSKYMCInstLower.cpp
llvm/lib/Target/CSKY/CSKYRegisterInfo.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Language/CPlusPlus/Generic.h 
b/lldb/source/Plugins/Language/CPlusPlus/Generic.h
index e25dd74feef69..bfb28bebf90be 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/Generic.h
+++ b/lldb/source/Plugins/Language/CPlusPlus/Generic.h
@@ -22,4 +22,4 @@ bool GenericOptionalSummaryProvider(ValueObject &valobj, 
Stream &stream,
 } // namespace formatters
 } // namespace lldb_private
 
-#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_GENERIC_H
\ No newline at end of file
+#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_GENERIC_H

diff  --git a/llvm/include/llvm/Analysis/NoInferenceModelRunner.h 
b/llvm/include/llvm/Analysis/NoInferenceModelRunner.h
index 6f6f5a009b1c7..60d6777c765b8 100644
--- a/llvm/include/llvm/Analysis/NoInferenceModelRunner.h
+++ b/llvm/include/llvm/Analysis/NoInferenceModelRunner.h
@@ -36,4 +36,4 @@ class NoInferenceModelRunner : public MLModelRunner {
 };
 } // namespace llvm
 #endif // defined(LLVM_HAVE_TF_API)
-#endif // defined(LLVM_ANALYSIS_NOINFERENCEMODELRUNNER_H)
\ No newline at end of file
+#endif // defined(LLVM_ANALYSIS_NOINFERENCEMODELRUNNER_H)

diff  --git a/llvm/lib/Analysis/NoInferenceModelRunner.cpp 
b/llvm/lib/Analysis/NoInferenceModelRunner.cpp
index e8f90c22e818e..02ece6aa39006 100644
--- a/llvm/lib/Analysis/NoInferenceModelRunner.cpp
+++ b/llvm/lib/Analysis/NoInferenceModelRunner.cpp
@@ -30,4 +30,4 @@ NoInferenceModelRunner::NoInferenceModelRunner(
 void *NoInferenceModelRunner::getTensorUntyped(size_t Index) {
   return ValuesBuffer[Index].get();
 }
-#endif // defined(LLVM_HAVE_TF_API)
\ No newline at end of file
+#endif // defined(LLVM_HAVE_TF_API)

diff  --git a/llvm/lib/MC/MCInstrAnalysis.cpp b/llvm/lib/MC/MCInstrAnalysis.cpp
index 52b59185c6fca..4ed1c6286a72b 100644
--- a/llvm/lib/MC/MCInstrAnalysis.cpp
+++ b/llvm/lib/MC/MCInstrAnalysis.cpp
@@ -39,4 +39,4 @@ Optional
 MCInstrAnalysis::getMemoryOperandRelocationOffset(const MCInst &Inst,
   uint64_t Size) const {
   return None;
-}
\ No newline at end of file
+}

diff  --git a/llvm/lib/Support/AArch64TargetParser.cpp 
b/llvm/lib/Support/AArch64TargetParser.cpp
index a3e41ccd199cf..4bc9c84871313 100644
--- a/llvm/lib/Support/AArch64TargetParser.cpp
+++ b/llvm/lib/Support/AArch64TargetParser.cpp
@@ -240,4 +240,4 @@ AArch64::ArchKind AArch64::parseCPUArch(StringRef CPU) {
   return C.ArchID;
   }
   return ArchKind::INVALID;
-}
\ No newline at end of file
+}

diff  --git a/llvm/lib/Target/CSKY/CSKYCallingConv.td 
b/llvm/lib/Target/CSKY/CSKYCallingConv.td
index 87e2e6b9dc316..91102e3714df9 100644
--- a/llvm/lib/Target/CSKY/CSKYCallingConv.td
+++ b/llvm/lib/Target/CSKY/CSKYCallingConv.td
@@ -79,4 +79,4 @@ def RetCC_CSKY_ABIV2_FP : CallingConv<[
   CCIfType<[i32], CCAssignToReg<[R0, R1]>>,
   CCIfType<[f32], CCAssignToReg<[F0_32]>>,
   CCIfType<[f64], CCAssignToReg<[F0_64]>>
-]>;
\ No newline at end of file
+]>;

diff  --git a/llvm/lib/Target/CSKY/CSKYFrameLowering.cpp 
b/llvm/lib/Target/CSKY/CSKYFrameLowering.cpp
index 9b22c95cfe21b..3a8ee5713584b 100644
--- a/llvm/lib/Target/CSKY/CSKYFrameLowering.cpp
+++ b/llvm/lib/Target/CSKY/CSKYFrameLowering.cpp
@@ -54,4 +54,4 @@ void CSKYFrameLowering::emitPrologue(MachineFunction &MF,
 void CSKYFrameLowering::emitEpilogue(MachineFunction &MF,
  MachineBasicBlock &MBB) const {
   // FIXME: Implement this when we have function calls
-}
\ No newline at end of file
+}

diff  --git a/llvm/lib/Target/CSKY/CSKYMCInstLower.cpp 
b/llvm/lib/Target/CSKY/CSKYMCInstLower.cpp
index c42a56bfb04ea..7e0b9bcd75491 100644
--- a/llvm/lib/Target/CSKY/CSKYMCInstLower.cpp
+++ b/llvm/lib/Target/CSKY/CSKYMCInstLower.cpp
@@ -114,4 +114,4 @@ bool CSKYMCInstLower::lowerOperand(const MachineOperand &MO,
 break;
   }
   return true;
-}
\ No newline at end of file
+}

diff  --git a/llvm/lib/Target/CSKY/CSKYRegisterInfo.cpp 
b/llvm/lib/Target/CSKY/CSKYRegisterInfo.cpp
index d3b270e1a7bc5..57b6ae3c27b59 100644
--- a/llvm/lib/Target/CSKY/CSKYRegisterInfo.cpp
+++ b/llvm/lib/Target/CSKY/CSKYRegisterInfo.cpp
@@ -271,4 

[Lldb-commits] [PATCH] D115308: [LLDB] Uniquify Type in type list.

2021-12-12 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added a comment.

In D115308#3184564 , @shafik wrote:

> I would also like to know where this duplicate insertion is happening. Can 
> you walk us through the steps that lead to the duplicate entries? thank you!

Firstly, I found that `SymbolFileDWARF::ParseType` -> 
`DWARFASTParserClang::ParseTypeFromDWARF` -> 
`DWARFASTParserClang::UpdateSymbolContextScopeForType`. It's inserting the same 
type at both places (SymbolFileDWARF::ParseType 

 and DWARFASTParserClang::UpdateSymbolContextScopeForType 

 ). In my first revision, I just attempted to remove the insertion in 
UpdateSymbolContextScopeForType. Then I found that when running `lldb-test 
symbols [binary]`, it's inserting same types at `ParseTypes`. For following 
dwarf info, when `ParseType` was called for `DW_TAG_subroutine_type`, it will 
also call `ParseType` for the type `DW_TAG_base_type` inside it. When the 
top-level `ParseTypes` iterates to `0x010f`, the type will be inserted 
twice:

  0x010a:   DW_TAG_subroutine_type
  DW_AT_type  (0x010f "int")
  
  0x010f:   DW_TAG_base_type
  DW_AT_name  ("int")
  DW_AT_encoding  (DW_ATE_signed)
  DW_AT_byte_size (0x04)

So, I figured it might be better to deduplicate the types inside TypeList when 
insertion happens, though `ParseTypes` is only used at `lldb-test`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115308

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