[Lldb-commits] [lldb] r346220 - Add parens to silence warning

2018-11-06 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Tue Nov  6 02:13:37 2018
New Revision: 346220

URL: http://llvm.org/viewvc/llvm-project?rev=346220&view=rev
Log:
Add parens to silence warning

MSVCUndecoratedNameParser.cpp:25:36: warning: '&&' within '||' 
[-Wlogical-op-parentheses]

Modified:
lldb/trunk/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp

Modified: 
lldb/trunk/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp?rev=346220&r1=346219&r2=346220&view=diff
==
--- lldb/trunk/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp 
(original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.cpp 
Tue Nov  6 02:13:37 2018
@@ -22,7 +22,7 @@ MSVCUndecoratedNameParser::MSVCUndecorat
   // Do not treat `operator<' and `operator<<' as templates
   // (sometimes they represented as `<' and `<<' in the name).
   if (i == last_base_start ||
-  i == last_base_start + 1 && name[last_base_start] == '<')
+  (i == last_base_start + 1 && name[last_base_start] == '<'))
 break;
 
   stack.push(i);


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


[Lldb-commits] [lldb] r347188 - Remove unused variable. NFC.

2018-11-19 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Mon Nov 19 02:59:12 2018
New Revision: 347188

URL: http://llvm.org/viewvc/llvm-project?rev=347188&view=rev
Log:
Remove unused variable. NFC.

Modified:
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp

Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=347188&r1=347187&r2=347188&view=diff
==
--- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Mon Nov 19 02:59:12 2018
@@ -770,7 +770,6 @@ typedef union {
 } TaggedDoubleBits;
 
 static uint64_t decodeExponent(uint64_t exp) {
-  int64_t exp7 = exp;
   // Tagged exponent field is 7-bit signed. Sign-extend the value to 64 bits
   // before performing arithmetic.
   return llvm::SignExtend64<7>(exp) + TAGGED_DATE_EXPONENT_BIAS;


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


[Lldb-commits] [lldb] r333273 - Fix format string

2018-05-25 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Fri May 25 05:59:59 2018
New Revision: 333273

URL: http://llvm.org/viewvc/llvm-project?rev=333273&view=rev
Log:
Fix format string

PRIx64 already has the x inside, so this was creating a nonsensical format
string.

Modified:
lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp

Modified: lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp?rev=333273&r1=333272&r2=333273&view=diff
==
--- lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanStepOverBreakpoint.cpp Fri May 25 
05:59:59 2018
@@ -99,7 +99,7 @@ bool ThreadPlanStepOverBreakpoint::DoPla
 
 if (pc_addr == m_breakpoint_addr) {
   if (log)
-log->Printf("Got breakpoint stop reason but pc: %x" PRIx64 
+log->Printf("Got breakpoint stop reason but pc: 0x%" PRIx64
 "hasn't changed.", pc_addr);
   return true;
 }


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


[Lldb-commits] [lldb] r334755 - One ShortFract ought to be enough for everyone.

2018-06-14 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Thu Jun 14 12:20:48 2018
New Revision: 334755

URL: http://llvm.org/viewvc/llvm-project?rev=334755&view=rev
Log:
One ShortFract ought to be enough for everyone.

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=334755&r1=334754&r2=334755&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Jun 14 12:20:48 2018
@@ -4942,7 +4942,6 @@ lldb::Encoding ClangASTContext::GetEncod
 case clang::BuiltinType::UAccum:
 case clang::BuiltinType::ULongAccum:
 case clang::BuiltinType::ShortFract:
-case clang::BuiltinType::ShortFract:
 case clang::BuiltinType::Fract:
 case clang::BuiltinType::LongFract:
 case clang::BuiltinType::UShortFract:


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


[Lldb-commits] [lldb] r342046 - Remove unused include that's also a layering violation.

2018-09-12 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Wed Sep 12 04:27:10 2018
New Revision: 342046

URL: http://llvm.org/viewvc/llvm-project?rev=342046&view=rev
Log:
Remove unused include that's also a layering violation.

Modified:
lldb/trunk/source/Target/CPPLanguageRuntime.cpp

Modified: lldb/trunk/source/Target/CPPLanguageRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/CPPLanguageRuntime.cpp?rev=342046&r1=342045&r2=342046&view=diff
==
--- lldb/trunk/source/Target/CPPLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/CPPLanguageRuntime.cpp Wed Sep 12 04:27:10 2018
@@ -14,7 +14,6 @@
 
 #include "llvm/ADT/StringRef.h"
 
-#include "lldb/API/SBValue.h"
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/VariableList.h"
 


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


[Lldb-commits] [lldb] r342047 - Remove another unused mislayered include.

2018-09-12 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Wed Sep 12 04:31:18 2018
New Revision: 342047

URL: http://llvm.org/viewvc/llvm-project?rev=342047&view=rev
Log:
Remove another unused mislayered include.

Modified:
lldb/trunk/source/Target/CPPLanguageRuntime.cpp

Modified: lldb/trunk/source/Target/CPPLanguageRuntime.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/CPPLanguageRuntime.cpp?rev=342047&r1=342046&r2=342047&view=diff
==
--- lldb/trunk/source/Target/CPPLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/CPPLanguageRuntime.cpp Wed Sep 12 04:31:18 2018
@@ -17,7 +17,6 @@
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/VariableList.h"
 
-#include "lldb/API/SBFrame.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/UniqueCStringMap.h"
 #include "lldb/Symbol/ClangASTContext.h"


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


[Lldb-commits] [lldb] r330823 - Fix -Wswitch warning after r330790.

2018-04-25 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Wed Apr 25 06:22:47 2018
New Revision: 330823

URL: http://llvm.org/viewvc/llvm-project?rev=330823&view=rev
Log:
Fix -Wswitch warning after r330790.

source/Symbol/ClangASTContext.cpp:391:13: error: enumeration value 'HIP' not 
handled in switch [-Werror,-Wswitch]
switch (IK.getLanguage()) {

Modified:
lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=330823&r1=330822&r2=330823&view=diff
==
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Wed Apr 25 06:22:47 2018
@@ -408,6 +408,9 @@ static void ParseLangArgs(LangOptions &O
 case InputKind::ObjCXX:
   LangStd = LangStandard::lang_gnucxx98;
   break;
+case InputKind::HIP:
+  LangStd = LangStandard::lang_hip;
+  break;
 }
   }
 


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


[Lldb-commits] [lldb] r304158 - Replace forward decl with include to unbreak the build.

2017-05-29 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Mon May 29 09:40:07 2017
New Revision: 304158

URL: http://llvm.org/viewvc/llvm-project?rev=304158&view=rev
Log:
Replace forward decl with include to unbreak the build.

Modified:
lldb/trunk/include/lldb/Utility/Log.h

Modified: lldb/trunk/include/lldb/Utility/Log.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Log.h?rev=304158&r1=304157&r2=304158&view=diff
==
--- lldb/trunk/include/lldb/Utility/Log.h (original)
+++ lldb/trunk/include/lldb/Utility/Log.h Mon May 29 09:40:07 2017
@@ -18,6 +18,7 @@
 #include "llvm/ADT/StringMap.h" // for StringMap
 #include "llvm/ADT/StringRef.h" // for StringRef, StringLiteral
 #include "llvm/Support/FormatVariadic.h"
+#include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/RWMutex.h"
 
 #include 
@@ -30,9 +31,6 @@
 namespace llvm {
 class raw_ostream;
 }
-namespace llvm {
-template  class ManagedStatic;
-}
 //--
 // Logging Options
 //--


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


[Lldb-commits] [lldb] r313265 - Remove uses of std::auto_ptr, it's going away in C++17.

2017-09-14 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Thu Sep 14 08:01:55 2017
New Revision: 313265

URL: http://llvm.org/viewvc/llvm-project?rev=313265&view=rev
Log:
Remove uses of std::auto_ptr, it's going away in C++17.

std::unique_ptr is pretty much a drop-in replacement here. Also remove nullptr
checks that are doing nothing.

Modified:
lldb/trunk/source/Core/IOHandler.cpp
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Modified: lldb/trunk/source/Core/IOHandler.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=313265&r1=313264&r2=313265&view=diff
==
--- lldb/trunk/source/Core/IOHandler.cpp (original)
+++ lldb/trunk/source/Core/IOHandler.cpp Thu Sep 14 08:01:55 2017
@@ -1146,7 +1146,7 @@ public:
   const char *text = m_delegate_sp->WindowDelegateGetHelpText();
   KeyHelp *key_help = m_delegate_sp->WindowDelegateGetKeyHelp();
   if ((text && text[0]) || key_help) {
-std::auto_ptr help_delegate_ap(
+std::unique_ptr help_delegate_ap(
 new HelpDialogDelegate(text, key_help));
 const size_t num_lines = help_delegate_ap->GetNumLines();
 const size_t max_length = help_delegate_ap->GetMaxLineLength();

Modified: 
lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=313265&r1=313264&r2=313265&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Thu 
Sep 14 08:01:55 2017
@@ -167,10 +167,7 @@ EmulateInstructionARM64::CreateInstance(
   if (EmulateInstructionARM64::SupportsEmulatingInstructionsOfTypeStatic(
   inst_type)) {
 if (arch.GetTriple().getArch() == llvm::Triple::aarch64) {
-  std::auto_ptr emulate_insn_ap(
-  new EmulateInstructionARM64(arch));
-  if (emulate_insn_ap.get())
-return emulate_insn_ap.release();
+  return new EmulateInstructionARM64(arch);
 }
   }
 

Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=313265&r1=313264&r2=313265&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Thu 
Sep 14 08:01:55 2017
@@ -212,10 +212,7 @@ EmulateInstructionMIPS::CreateInstance(c
   inst_type)) {
 if (arch.GetTriple().getArch() == llvm::Triple::mips ||
 arch.GetTriple().getArch() == llvm::Triple::mipsel) {
-  std::auto_ptr emulate_insn_ap(
-  new EmulateInstructionMIPS(arch));
-  if (emulate_insn_ap.get())
-return emulate_insn_ap.release();
+  return new EmulateInstructionMIPS(arch);
 }
   }
 

Modified: 
lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp?rev=313265&r1=313264&r2=313265&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp 
Thu Sep 14 08:01:55 2017
@@ -199,10 +199,7 @@ EmulateInstructionMIPS64::CreateInstance
   inst_type)) {
 if (arch.GetTriple().getArch() == llvm::Triple::mips64 ||
 arch.GetTriple().getArch() == llvm::Triple::mips64el) {
-  std::auto_ptr emulate_insn_ap(
-  new EmulateInstructionMIPS64(arch));
-  if (emulate_insn_ap.get())
-return emulate_insn_ap.release();
+  return new EmulateInstructionMIPS64(arch);
 }
   }
 

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=313265&r1=313264&r2=313265&view=diff
==
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Thu Sep 14 
08:01:55 2017
@@ -451,7 +451,7 @@ ObjectFile *ObjectFileELF::CreateMemoryI
 if (ELFHeader::MagicBytesMatch(magic)) {
   unsigned address_size = ELFHeader::AddressSizeInBytes(magic);
   if (address_si

[Lldb-commits] [lldb] r355684 - Make function definition in header inline

2019-03-08 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Fri Mar  8 02:43:56 2019
New Revision: 355684

URL: http://llvm.org/viewvc/llvm-project?rev=355684&view=rev
Log:
Make function definition in header inline

Otherwise including this header from more than one place will break
linking.

Modified:
lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h

Modified: lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h?rev=355684&r1=355683&r2=355684&view=diff
==
--- lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h (original)
+++ lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h Fri Mar  8 
02:43:56 2019
@@ -22,40 +22,40 @@
 
 template ::value, int>::type = 
0>
-void log_append(llvm::raw_string_ostream &ss, const T &t) {
+inline void log_append(llvm::raw_string_ostream &ss, const T &t) {
   ss << t;
 }
 
 template ::value,
   int>::type = 0>
-void log_append(llvm::raw_string_ostream &ss, const T &t) {
+inline void log_append(llvm::raw_string_ostream &ss, const T &t) {
   ss << &t;
 }
 
 template 
-void log_append(llvm::raw_string_ostream &ss, const T *t) {
+inline void log_append(llvm::raw_string_ostream &ss, const T *t) {
   ss << t;
 }
 
-inline template <>
-void log_append(llvm::raw_string_ostream &ss, const char *t) {
+template <>
+inline void log_append(llvm::raw_string_ostream &ss, const char *t) {
   ss << t;
 }
 
 template 
-void log_helper(llvm::raw_string_ostream &ss, const Head &head) {
+inline void log_helper(llvm::raw_string_ostream &ss, const Head &head) {
   log_append(ss, head);
 }
 
 template 
-void log_helper(llvm::raw_string_ostream &ss, const Head &head,
-const Tail &... tail) {
+inline void log_helper(llvm::raw_string_ostream &ss, const Head &head,
+   const Tail &... tail) {
   log_append(ss, head);
   ss << ", ";
   log_helper(ss, tail...);
 }
 
-template  std::string log_args(const Ts &... ts) {
+template  inline std::string log_args(const Ts &... ts) {
   std::string buffer;
   llvm::raw_string_ostream ss(buffer);
   log_helper(ss, ts...);


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


[Lldb-commits] [lldb] r275409 - Upgrade all the .arcconfigs to https.

2016-07-14 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Thu Jul 14 08:15:37 2016
New Revision: 275409

URL: http://llvm.org/viewvc/llvm-project?rev=275409&view=rev
Log:
Upgrade all the .arcconfigs to https.

Modified:
lldb/trunk/.arcconfig

Modified: lldb/trunk/.arcconfig
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/.arcconfig?rev=275409&r1=275408&r2=275409&view=diff
==
--- lldb/trunk/.arcconfig (original)
+++ lldb/trunk/.arcconfig Thu Jul 14 08:15:37 2016
@@ -1,4 +1,4 @@
 {
   "project_id" : "lldb",
-  "conduit_uri" : "http://reviews.llvm.org/";
+  "conduit_uri" : "https://reviews.llvm.org/";
 }


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


[Lldb-commits] [lldb] r258819 - Update for LLVM change

2016-01-26 Thread Benjamin Kramer via lldb-commits
Author: d0k
Date: Tue Jan 26 10:45:00 2016
New Revision: 258819

URL: http://llvm.org/viewvc/llvm-project?rev=258819&view=rev
Log:
Update for LLVM change

Modified:
lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp

Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=258819&r1=258818&r2=258819&view=diff
==
--- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original)
+++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Tue Jan 
26 10:45:00 2016
@@ -11,20 +11,20 @@
 // C++ Includes
 // Project includes
 #include "llvm-c/Disassembler.h"
+#include "llvm/ADT/SmallString.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCDisassembler.h"
-#include "llvm/MC/MCExternalSymbolizer.h"
+#include "llvm/MC/MCDisassembler/MCDisassembler.h"
+#include "llvm/MC/MCDisassembler/MCExternalSymbolizer.h"
+#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstPrinter.h"
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
-#include "llvm/MC/MCRelocationInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
-#include "llvm/ADT/SmallString.h"
 
 // Other libraries and framework includes
 #include "DisassemblerLLVMC.h"

Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=258819&r1=258818&r2=258819&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Tue 
Jan 26 10:45:00 2016
@@ -17,7 +17,7 @@
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstrInfo.h"
-#include "llvm/MC/MCDisassembler.h"
+#include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/MCContext.h"

Modified: 
lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp?rev=258819&r1=258818&r2=258819&view=diff
==
--- lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp 
(original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp 
Tue Jan 26 10:45:00 2016
@@ -17,7 +17,7 @@
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstrInfo.h"
-#include "llvm/MC/MCDisassembler.h"
+#include "llvm/MC/MCDisassembler/MCDisassembler.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
 #include "llvm/MC/MCContext.h"


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


[Lldb-commits] [lldb] c87b2c9 - [RISC-V] Remove unnecessary VLA

2023-09-29 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2023-09-29T18:45:05+02:00
New Revision: c87b2c9c82e54b6cb21e668cd3e1097a44d5d48a

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

LOG: [RISC-V] Remove unnecessary VLA

They're still non-standard in C++17.

Added: 


Modified: 
lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp 
b/lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp
index bdcbeaca68fa33d..6395f5bb5bd9b01 100644
--- a/lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp
+++ b/lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp
@@ -231,7 +231,7 @@ bool ABISysV_riscv::PrepareTrivialCall(
   args_size <= regs_for_args_count ? 0 : args_size - regs_for_args_count;
   auto offset = on_stack * word_size;
 
-  uint8_t reg_value[reg_size];
+  uint8_t reg_value[8];
   size_t reg_index = LLDB_REGNUM_GENERIC_ARG1;
 
   for (size_t i = 0; i < args_size; ++i) {



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


[Lldb-commits] [lldb] 81ec95f - Silence -Wswitch warnings

2024-03-20 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2024-03-20T13:06:29+01:00
New Revision: 81ec95ff983afd7f31c2713891bbc37bd630a100

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

LOG: Silence -Wswitch warnings

TypeSystemClang.cpp:4074:11: error: enumeration value 'CountAttributed' not 
handled in switch [-Werror,-Wswitch]
 4074 |   switch (qual_type->getTypeClass()) {
  |   ^
TypeSystemClang.cpp:4755:11: error: enumeration value 'CountAttributed' not 
handled in switch [-Werror,-Wswitch]
 4755 |   switch (qual_type->getTypeClass()) {
  |   ^
TypeSystemClang.cpp:5088:11: error: enumeration value 'CountAttributed' not 
handled in switch [-Werror,-Wswitch]
 5088 |   switch (qual_type->getTypeClass()) {
  |   ^

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 68d9165b90a47b..3ac1cf91932cca 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -4074,6 +4074,7 @@ 
TypeSystemClang::GetTypeClass(lldb::opaque_compiler_type_t type) {
   switch (qual_type->getTypeClass()) {
   case clang::Type::Atomic:
   case clang::Type::Auto:
+  case clang::Type::CountAttributed:
   case clang::Type::Decltype:
   case clang::Type::Elaborated:
   case clang::Type::Paren:
@@ -4755,6 +4756,7 @@ lldb::Encoding 
TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
   switch (qual_type->getTypeClass()) {
   case clang::Type::Atomic:
   case clang::Type::Auto:
+  case clang::Type::CountAttributed:
   case clang::Type::Decltype:
   case clang::Type::Elaborated:
   case clang::Type::Paren:
@@ -5088,6 +5090,7 @@ lldb::Format 
TypeSystemClang::GetFormat(lldb::opaque_compiler_type_t type) {
   switch (qual_type->getTypeClass()) {
   case clang::Type::Atomic:
   case clang::Type::Auto:
+  case clang::Type::CountAttributed:
   case clang::Type::Decltype:
   case clang::Type::Elaborated:
   case clang::Type::Paren:



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


[Lldb-commits] [lldb] 81f4874 - Silence format string warning harder.

2021-12-08 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-12-08T19:37:32+01:00
New Revision: 81f4874cbf35fcbd220cda4d4fafedffdb909e3a

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

LOG: Silence format string warning harder.

This can be unsigned long or unsigned long long depending on where it's
compiled. Use the ugly portable way.
PlatformWindows.cpp:397:63: warning: format specifies type 'unsigned long long' 
but the argument has type 'uint64_t' (aka 'unsigned long')

Added: 


Modified: 
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp 
b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
index eb1e3a9f7a00..220a153f5c3b 100644
--- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
@@ -394,7 +394,7 @@ uint32_t PlatformWindows::DoLoadImage(Process *process,
   return LLDB_INVALID_IMAGE_TOKEN;
 }
 
-error.SetErrorStringWithFormat("LoadLibrary Error: %llu", error_code);
+error.SetErrorStringWithFormat("LoadLibrary Error: %" PRIu64, error_code);
 return LLDB_INVALID_IMAGE_TOKEN;
   }
 



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


[Lldb-commits] [lldb] 12873d1 - Silence unused variable warning in release builds

2021-12-17 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-12-17T16:07:02+01:00
New Revision: 12873d1a670b4a82b5853dabc8b6ea4d300759af

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

LOG: Silence unused variable warning in release builds

lldb/source/Core/DataFileCache.cpp:278:10: warning: unused variable 'pos' 
[-Wunused-variable]
auto pos = m_string_to_offset.find(s);
 ^
lldb/source/Core/DataFileCache.cpp:277:18: warning: unused variable 'stroff' 
[-Wunused-variable]
const size_t stroff = encoder.GetByteSize() - strtab_offset;
 ^

Added: 


Modified: 
lldb/source/Core/DataFileCache.cpp

Removed: 




diff  --git a/lldb/source/Core/DataFileCache.cpp 
b/lldb/source/Core/DataFileCache.cpp
index 8d4dba307a124..3f52b925ef467 100644
--- a/lldb/source/Core/DataFileCache.cpp
+++ b/lldb/source/Core/DataFileCache.cpp
@@ -274,9 +274,8 @@ bool ConstStringTable::Encode(DataEncoder &encoder) {
   encoder.AppendU8(0); // Start the string table with with an empty string.
   for (auto s: m_strings) {
 // Make sure all of the offsets match up with what we handed out!
-const size_t stroff = encoder.GetByteSize() - strtab_offset;
-auto pos = m_string_to_offset.find(s);
-assert(pos->second == stroff);
+assert(m_string_to_offset.find(s)->second ==
+   encoder.GetByteSize() - strtab_offset);
 // Append the C string into the encoder
 encoder.AppendCString(s.GetStringRef());
   }



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


[Lldb-commits] [lldb] 05cd79d - [lldb] Fix some accidental IntervalMap copies

2022-02-19 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2022-02-19T20:56:03+01:00
New Revision: 05cd79d59900ac57a94a0699594163689606b336

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

LOG: [lldb] Fix some accidental IntervalMap copies

I made that type non-copyable in some cases in dc4f9f0368cd

Added: 


Modified: 
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp 
b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index a1ff6adea1202..f9929aed06ecf 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1679,8 +1679,8 @@ class VMAddressProvider {
   ObjectFile::Type ObjectType;
   addr_t NextVMAddress = 0;
   VMMap::Allocator Alloc;
-  VMMap Segments = VMMap(Alloc);
-  VMMap Sections = VMMap(Alloc);
+  VMMap Segments{Alloc};
+  VMMap Sections{Alloc};
   lldb_private::Log *Log = GetLog(LLDBLog::Modules);
   size_t SegmentCount = 0;
   std::string SegmentName;



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


[Lldb-commits] [lldb] 42d3d71 - Silence compiler warning after the addition of HLSL to Clang

2022-03-28 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2022-03-29T01:23:20+02:00
New Revision: 42d3d717b8140cb0ef2169d1ac25f0f166cd61bf

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

LOG: Silence compiler warning after the addition of HLSL to Clang

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:472:16: warning: 
enumeration value 'HLSL' not handled in switch [-Wswitch]
switch (IK.getLanguage()) {
   ^

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 2d5bd02febe54..019cb0c1b8449 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -495,6 +495,9 @@ static void ParseLangArgs(LangOptions &Opts, InputKind IK, 
const char *triple) {
 case clang::Language::HIP:
   LangStd = LangStandard::lang_hip;
   break;
+case clang::Language::HLSL:
+  LangStd = LangStandard::lang_hlsl;
+  break;
 }
   }
 



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


[Lldb-commits] [lldb] b7bf5a7 - [lldb] Add missing const to NativeRegisterContextLinux_arm

2022-04-05 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2022-04-05T23:39:08+02:00
New Revision: b7bf5a7a7ef4181813ea682a8f9dac56f25c3141

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

LOG: [lldb] Add missing const to NativeRegisterContextLinux_arm

Added: 


Modified: 
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp 
b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
index 7db0d9eec6d24..10ffe49f6b4e8 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
@@ -231,7 +231,7 @@ Status 
NativeRegisterContextLinux_arm::WriteAllRegisterValues(
 return error;
   }
 
-  uint8_t *src = data_sp->GetBytes();
+  const uint8_t *src = data_sp->GetBytes();
   if (src == nullptr) {
 error.SetErrorStringWithFormat("NativeRegisterContextLinux_arm::%s "
"DataBuffer::GetBytes() returned a null "

diff  --git 
a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp 
b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index dccd8049c03dc..cee727877a13d 100644
--- a/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -524,7 +524,7 @@ Status 
NativeRegisterContextLinux_arm64::WriteAllRegisterValues(
 return error;
   }
 
-  uint8_t *src = data_sp->GetBytes();
+  const uint8_t *src = data_sp->GetBytes();
   if (src == nullptr) {
 error.SetErrorStringWithFormat("NativeRegisterContextLinux_arm64::%s "
"DataBuffer::GetBytes() returned a null "



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


[Lldb-commits] [lldb] 2916b99 - [ADT] Alias llvm::Optional to std::optional

2022-12-19 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2022-12-20T01:01:46+01:00
New Revision: 2916b99182752b1aece8cc4479d8d6a20b5e02da

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

LOG: [ADT] Alias llvm::Optional to std::optional

This avoids the continuous API churn when upgrading things to use
std::optional and makes trivial string replace upgrades possible.

I tested this with GCC 7.5, the oldest supported GCC I had around.

Differential Revision: https://reviews.llvm.org/D140332

Added: 


Modified: 
clang/include/clang/Basic/LLVM.h
clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
flang/include/flang/Lower/Runtime.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
lldb/source/Symbol/Type.cpp
llvm/include/llvm/ADT/Optional.h
llvm/include/llvm/ADT/STLForwardCompat.h
llvm/include/llvm/Support/raw_ostream.h
llvm/include/llvm/Testing/Support/SupportHelpers.h
llvm/lib/CodeGen/RegAllocGreedy.h
llvm/unittests/ADT/CMakeLists.txt
llvm/unittests/Support/TypeTraitsTest.cpp
mlir/include/mlir/Bindings/Python/PybindAdaptors.h
mlir/include/mlir/Support/LLVM.h
mlir/lib/Bindings/Python/PybindUtils.h
mlir/lib/Dialect/GPU/Transforms/SerializeToHsaco.cpp

Removed: 
llvm/unittests/ADT/OptionalTest.cpp



diff  --git a/clang/include/clang/Basic/LLVM.h 
b/clang/include/clang/Basic/LLVM.h
index 5d4d72630970b..7ffc4c403473b 100644
--- a/clang/include/clang/Basic/LLVM.h
+++ b/clang/include/clang/Basic/LLVM.h
@@ -37,7 +37,7 @@ namespace llvm {
   template class SmallString;
   template class SmallVector;
   template class SmallVectorImpl;
-  template  class Optional;
+  template  using Optional = std::optional;
   template  class Expected;
 
   template

diff  --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp 
b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 7ced94a7dc371..f9e76d85efdde 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -481,7 +481,7 @@ Optional 
ExprEngine::getPendingInitLoop(ProgramStateRef State,
   const CXXConstructExpr *E,
   const LocationContext *LCtx) 
{
   const unsigned *V = State->get({E, LCtx->getStackFrame()});
-  return V ? Optional(*V) : std::nullopt;
+  return V ? std::make_optional(*V) : std::nullopt;
 }
 
 ProgramStateRef ExprEngine::removePendingInitLoop(ProgramStateRef State,
@@ -510,7 +510,7 @@ ExprEngine::getIndexOfElementToConstruct(ProgramStateRef 
State,
  const LocationContext *LCtx) {
   const unsigned *V =
   State->get({E, LCtx->getStackFrame()});
-  return V ? Optional(*V) : std::nullopt;
+  return V ? std::make_optional(*V) : std::nullopt;
 }
 
 ProgramStateRef
@@ -530,7 +530,7 @@ ExprEngine::getPendingArrayDestruction(ProgramStateRef 
State,
 
   const unsigned *V =
   State->get(LCtx->getStackFrame());
-  return V ? Optional(*V) : std::nullopt;
+  return V ? std::make_optional(*V) : std::nullopt;
 }
 
 ProgramStateRef ExprEngine::setPendingArrayDestruction(
@@ -600,7 +600,7 @@ ExprEngine::getObjectUnderConstruction(ProgramStateRef 
State,
const LocationContext *LC) {
   ConstructedObjectKey Key(Item, LC->getStackFrame());
   const SVal *V = State->get(Key);
-  return V ? Optional(*V) : std::nullopt;
+  return V ? std::make_optional(*V) : std::nullopt;
 }
 
 ProgramStateRef

diff  --git a/flang/include/flang/Lower/Runtime.h 
b/flang/include/flang/Lower/Runtime.h
index 64e9a16fd7988..da01d1a87cccd 100644
--- a/flang/include/flang/Lower/Runtime.h
+++ b/flang/include/flang/Lower/Runtime.h
@@ -16,9 +16,10 @@
 #ifndef FORTRAN_LOWER_RUNTIME_H
 #define FORTRAN_LOWER_RUNTIME_H
 
+#include 
+
 namespace llvm {
-template 
-class Optional;
+template  using Optional = std::optional;
 }
 
 namespace mlir {

diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
index 4efb5a2029e85..32960c2102eda 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -190,7 +190,7 @@ static FormSize g_form_sizes[] = {
 llvm::Optional
 DWARFFormValue::GetFixedSize(dw_form_t form, const DWARFUnit *u) {
   if (form <= DW_FORM_ref_sig8 && g_form_sizes[form].valid)
-return g_form_sizes[form].size;
+return static_cast(g_form_sizes[form].size);
   if (form == DW_FORM_addr && u)
 return u->GetAddressByteSize();
   return std::nullopt;

diff  --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp
index da9eeadc0ecd2..048e37fb1db2f 100644
--- a/lldb/source/Symbol/Type.cpp
+++ b/lldb/source/Symbol/Type.cpp
@@ -343,7 +343,7 @@ Type 

[Lldb-commits] [lldb] 8959968 - [lldb] Unbreak test after 931d04be2fc8f3f0505b43e64297f75d526cb42a

2023-01-15 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2023-01-15T21:39:31+01:00
New Revision: 8959968b7225d154dca05cdeee17f9477429c420

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

LOG: [lldb] Unbreak test after 931d04be2fc8f3f0505b43e64297f75d526cb42a

Added: 


Modified: 
lldb/unittests/Core/SourceLocationSpecTest.cpp

Removed: 




diff  --git a/lldb/unittests/Core/SourceLocationSpecTest.cpp 
b/lldb/unittests/Core/SourceLocationSpecTest.cpp
index 0cf1683906eed..0b451f56c765a 100644
--- a/lldb/unittests/Core/SourceLocationSpecTest.cpp
+++ b/lldb/unittests/Core/SourceLocationSpecTest.cpp
@@ -122,7 +122,7 @@ TEST(SourceLocationSpecTest, Equal) {
 
 TEST(SourceLocationSpecTest, Compare) {
   auto Cmp = [](SourceLocationSpec a, SourceLocationSpec b) {
-return SourceLocationSpec::Compare(a, b);
+return std::clamp(SourceLocationSpec::Compare(a, b), -1, 1);
   };
 
   FileSpec fs("/foo/bar", FileSpec::Style::posix);



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


[Lldb-commits] [lldb] be7d7ca - [lldb] Use portable format string PRIx64

2023-02-13 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2023-02-13T22:45:21+01:00
New Revision: be7d7ca1101840fc8e19e0e48f9dc395da569d23

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

LOG: [lldb] Use portable format string PRIx64

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index a37499175858..113a8b352b66 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -76,8 +76,8 @@ void DWARFDebugAranges::Dump(Log *log) const {
   for (size_t i = 0; i < num_entries; ++i) {
 const RangeToDIE::Entry *entry = m_aranges.GetEntryAtIndex(i);
 if (entry)
-  LLDB_LOGF(log, "0x%8.8x: [0x%" PRIx64 " - 0x%" PRIx64 ")", entry->data,
-entry->GetRangeBase(), entry->GetRangeEnd());
+  LLDB_LOGF(log, "0x%8.8" PRIx64 ": [0x%" PRIx64 " - 0x%" PRIx64 ")",
+entry->data, entry->GetRangeBase(), entry->GetRangeEnd());
   }
 }
 



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


[Lldb-commits] [lldb] 37f5c59 - [lldb] Add missing wasm switch case

2023-02-19 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2023-02-19T10:54:10+01:00
New Revision: 37f5c598a22a0e11d827979c910befb0b57c2033

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

LOG: [lldb] Add missing wasm switch case

TypeSystemClang.cpp:4855:13: error: enumeration value 'WasmExternRef' not 
handled in switch [-Werror,-Wswitch]

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index af897a70bd094..bf0dcc3a92576 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -5118,6 +5118,10 @@ lldb::Encoding 
TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
 case clang::BuiltinType::RvvBool64:
   break;
 
+// WebAssembly builtin types.
+case clang::BuiltinType::WasmExternRef:
+  break;
+
 case clang::BuiltinType::IncompleteMatrixIdx:
   break;
 }



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


[Lldb-commits] [lldb] 9c6b690 - [lldb] Move #include out of namespace lldb. NFC.

2023-03-25 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2023-03-25T13:36:49+01:00
New Revision: 9c6b69000d9307a36745004ee9300f70a5415160

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

LOG: [lldb] Move #include out of namespace lldb. NFC.

Including system headers in a namespace is not safe.

Added: 


Modified: 
lldb/include/lldb/lldb-types.h

Removed: 




diff  --git a/lldb/include/lldb/lldb-types.h b/lldb/include/lldb/lldb-types.h
index 890b513cd6ee8..f38095ffebd89 100644
--- a/lldb/include/lldb/lldb-types.h
+++ b/lldb/include/lldb/lldb-types.h
@@ -33,11 +33,11 @@
 //  LLDB_INVALID_HOST_THREAD  The value of an invalid lldb::thread_t
 //  LLDB_INVALID_PIPE The value of an invalid lldb::pipe_t
 
-namespace lldb {
-
 #ifdef _WIN32
 
 #include 
+
+namespace lldb {
 typedef void *rwlock_t;
 typedef void *process_t;  // Process type is HANDLE
 typedef void *thread_t;   // Host thread type
@@ -51,6 +51,8 @@ typedef void *pipe_t; // Host 
pipe type is HANDLE
 #else
 
 #include 
+
+namespace lldb {
 typedef pthread_rwlock_t rwlock_t;
 typedef uint64_t process_t; // Process type is just a pid.
 typedef pthread_t thread_t; // Host thread type



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


[Lldb-commits] [lldb] 5130e04 - [lldb] Don't write to source directory in test

2023-05-12 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2023-05-12T12:26:29+02:00
New Revision: 5130e049ff43eee4fcabdfda3c626f1bc051ba31

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

LOG: [lldb] Don't write to source directory in test

Added: 


Modified: 
lldb/test/Shell/Commands/command-disassemble-mixed.test

Removed: 




diff  --git a/lldb/test/Shell/Commands/command-disassemble-mixed.test 
b/lldb/test/Shell/Commands/command-disassemble-mixed.test
index d27cdb1cb5a16..e078f341a694b 100644
--- a/lldb/test/Shell/Commands/command-disassemble-mixed.test
+++ b/lldb/test/Shell/Commands/command-disassemble-mixed.test
@@ -6,8 +6,8 @@ int main() {
   return abc;
 }
 
-// RUN: %clang_host -g -x c -o a.out %s
-// RUN: %lldb -b -o 'disassemble --mixed -n main' a.out | FileCheck %s
+// RUN: %clang_host -g -x c -o %t.out %s
+// RUN: %lldb -b -o 'disassemble --mixed -n main' %t.out | FileCheck %s
 
-// CHECK: a.out`main:
+// CHECK: .out`main:
 // CHECK-NOT: do_not_show



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


[Lldb-commits] [lldb] 4a0ba41 - [lldb] Fix pessimizing move warning

2021-09-06 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-09-06T21:17:29+02:00
New Revision: 4a0ba4180b3655aa39c68648c7a12ce9a1cec99a

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

LOG: [lldb] Fix pessimizing move warning

lldb/source/Core/PluginManager.cpp:695:21: warning: moving a temporary object 
prevents copy elision [-Wpessimizing-move]
  return Status(std::move(ret.takeError()));
^
lldb/source/Core/PluginManager.cpp:695:21: note: remove std::move call here
  return Status(std::move(ret.takeError()));
^~   ~

Added: 


Modified: 
lldb/source/Core/PluginManager.cpp

Removed: 




diff  --git a/lldb/source/Core/PluginManager.cpp 
b/lldb/source/Core/PluginManager.cpp
index d8cebc83005fe..012143576e527 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -692,7 +692,7 @@ Status PluginManager::SaveCore(const lldb::ProcessSP 
&process_sp,
 // Try saving core directly from the process plugin first.
 llvm::Expected ret = process_sp->SaveCore(outfile.GetPath());
 if (!ret)
-  return Status(std::move(ret.takeError()));
+  return Status(ret.takeError());
 if (ret.get())
   return Status();
   }



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


[Lldb-commits] [lldb] 3972415 - [lldb] Silence -Wpessimizing-move warning

2021-10-21 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-10-21T12:59:00+02:00
New Revision: 39724158d38766f7d8683f78f54d80d174cae96a

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

LOG: [lldb] Silence -Wpessimizing-move warning

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3635:10: error: moving 
a local object in a return statement prevents copy elision 
[-Werror,-Wpessimizing-move]
  return std::move(merged);
 ^

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 
b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 90b07ad061b0..d8a17755b247 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3632,7 +3632,7 @@ SymbolFileDWARF::MergeBlockAbstractParameters(const 
DWARFDIE &block_die,
 }
 merged.push_back(*concrete_it);
   }
-  return std::move(merged);
+  return merged;
 }
 
 size_t SymbolFileDWARF::ParseVariablesInFunctionContext(



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


[Lldb-commits] [lldb] 48677f5 - [lldb] Unbreak the macOS build after dfd499a61c45778b7f01458d50ccc384343f53d5

2021-11-02 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-11-02T09:47:44+01:00
New Revision: 48677f58b06cfb8715902173c5bc3d1764d7c8c6

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

LOG: [lldb] Unbreak the macOS build after 
dfd499a61c45778b7f01458d50ccc384343f53d5

Added: 


Modified: 
lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
lldb/source/Symbol/LocateSymbolFileMacOSX.cpp

Removed: 




diff  --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp 
b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
index 6e97f3d440f3f..d9f4174b19a3c 100644
--- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
+++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
@@ -239,7 +239,7 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP 
&module_sp,
 DBGSourcePath = resolved_source_path.GetPath();
   }
   module_sp->GetSourceMappingList().Append(
-  key, ConstString(DBGSourcePath), true);
+  key.GetStringRef(), DBGSourcePath, true);
   // With version 2 of DBGSourcePathRemapping, we
   // can chop off the last two filename parts
   // from the source remapping and get a more
@@ -254,8 +254,7 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP 
&module_sp,
 source_path.RemoveLastPathComponent();
 source_path.RemoveLastPathComponent();
 module_sp->GetSourceMappingList().Append(
-ConstString(build_path.GetPath().c_str()),
-ConstString(source_path.GetPath().c_str()),
+build_path.GetPath(), 
source_path.GetPath(),
 true);
   }
 }
@@ -276,8 +275,7 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP 
&module_sp,
 DBGSourcePath = resolved_source_path.GetPath();
   }
   module_sp->GetSourceMappingList().Append(
-  ConstString(DBGBuildSourcePath),
-  ConstString(DBGSourcePath), true);
+  DBGBuildSourcePath, DBGSourcePath, true);
 }
   }
 }

diff  --git a/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp 
b/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
index 2655e4de9063a..a13b4a7a54f2c 100644
--- a/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
+++ b/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
@@ -414,9 +414,8 @@ static bool 
GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
 // last two filename parts from the source remapping and get a more
 // general source remapping that still works. Add this as another
 // option in addition to the full source path remap.
-module_spec.GetSourceMappingList().Append(
-ConstString(DBGBuildSourcePath.c_str()),
-ConstString(DBGSourcePath.c_str()), true);
+module_spec.GetSourceMappingList().Append(DBGBuildSourcePath,
+  DBGSourcePath, true);
 if (do_truncate_remapping_names) {
   FileSpec build_path(DBGBuildSourcePath.c_str());
   FileSpec source_path(DBGSourcePath.c_str());
@@ -425,8 +424,7 @@ static bool 
GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
   source_path.RemoveLastPathComponent();
   source_path.RemoveLastPathComponent();
   module_spec.GetSourceMappingList().Append(
-  ConstString(build_path.GetPath().c_str()),
-  ConstString(source_path.GetPath().c_str()), true);
+  build_path.GetPath(), source_path.GetPath(), true);
 }
   }
 }
@@ -458,9 +456,8 @@ static bool 
GetModuleSpecInfoFromUUIDDictionary(CFDictionaryRef uuid_dict,
 FileSystem::Instance().Resolve(resolved_source_path);
 DBGSourcePath = resolved_source_path.GetPath();
   }
-  module_spec.GetSourceMappingList().Append(
-  ConstString(DBGBuildSourcePath.c_str()),
-  ConstString(DBGSourcePath.c_str()), true);
+  module_spec.GetSourceMappingList().Append(DBGBuildSourcePath,
+DBGSourcePath, true);
 }
   }
   return success;



___
lldb-commits mailing list
lldb-com

[Lldb-commits] [lldb] b6cf94e - Fix format specifier warning in EmulateInstructionRISCV more

2022-11-04 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2022-11-04T18:58:43+01:00
New Revision: b6cf94e973f9659086633ca56dc51bc74d4125eb

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

LOG: Fix format specifier warning in EmulateInstructionRISCV more

Yes, the portable macro is still the only way to do this.

Added: 


Modified: 
lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp 
b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
index 7b2f8c81e44b..c05b43f300fd 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -504,7 +504,9 @@ llvm::Optional 
EmulateInstructionRISCV::Decode(uint32_t inst) {
 
   for (const InstrPattern &pat : PATTERNS) {
 if ((inst & pat.type_mask) == pat.eigen) {
-  LLDB_LOGF(log, "EmulateInstructionRISCV::%s: inst(%x at %llx) was 
decoded to %s",
+  LLDB_LOGF(log,
+"EmulateInstructionRISCV::%s: inst(%x at %" PRIx64
+") was decoded to %s",
 __FUNCTION__, inst, m_addr, pat.name);
   auto decoded = is_rvc ? pat.decode(try_rvc) : pat.decode(inst);
   return DecodeResult{decoded, inst, is_rvc, pat};



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


[Lldb-commits] [lldb] 8b95d08 - Unbreak lldb build broken by d941fceca8e9

2022-11-23 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2022-11-23T21:01:47+01:00
New Revision: 8b95d08799cabaebf9b7549356e0552a17791dc6

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

LOG: Unbreak lldb build broken by d941fceca8e9

Added: 


Modified: 
lldb/source/Symbol/CompilerType.cpp

Removed: 




diff  --git a/lldb/source/Symbol/CompilerType.cpp 
b/lldb/source/Symbol/CompilerType.cpp
index d30c9d87fa48..34dc7140c1fd 100644
--- a/lldb/source/Symbol/CompilerType.cpp
+++ b/lldb/source/Symbol/CompilerType.cpp
@@ -96,7 +96,8 @@ bool CompilerType::IsCompleteType() const {
 
 bool CompilerType::IsForcefullyCompleted() const {
   if (IsValid())
-return m_type_system->IsForcefullyCompleted(m_type);
+if (auto type_system_sp = GetTypeSystem())
+  return type_system_sp->IsForcefullyCompleted(m_type);
   return false;
 }
 



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


[Lldb-commits] [lldb] aa09d1f - [lldb] Remove unused variable. NFCI

2021-07-20 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-07-20T10:34:05+02:00
New Revision: aa09d1f9c91555b715481defc84cc96d80e52516

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

LOG: [lldb] Remove unused variable. NFCI

Added: 


Modified: 
lldb/source/Target/Target.cpp

Removed: 




diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index 2a0dcaa4ce6b..fe715bbed3e7 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -1188,7 +1188,6 @@ bool Target::DisableAllWatchpoints(bool end_to_end) {
   if (!ProcessIsValid())
 return false;
 
-  size_t num_watchpoints = m_watchpoint_list.GetSize();
   for (WatchpointSP wp_sp : m_watchpoint_list.Watchpoints()) {
 if (!wp_sp)
   return false;



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


[Lldb-commits] [lldb] 7fa6b9f - [lldb] Silence compiler warning after fae0dfa6421ea6c02f86ba7292fa782e1e2b69d1

2021-09-06 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-09-06T12:30:47+02:00
New Revision: 7fa6b9f61058ff4839eb55d7fe8ec2f1e2493d5e

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

LOG: [lldb] Silence compiler warning after 
fae0dfa6421ea6c02f86ba7292fa782e1e2b69d1

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4765:13: warning: 
enumeration value 'Ibm128' not handled in switch [-Wswitch]
switch (llvm::cast(qual_type)->getKind()) {
^

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index 669ffdb95f8a..dbf11dcbd3ca 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -4824,6 +4824,7 @@ lldb::Encoding 
TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
 case clang::BuiltinType::Double:
 case clang::BuiltinType::LongDouble:
 case clang::BuiltinType::BFloat16:
+case clang::BuiltinType::Ibm128:
   return lldb::eEncodingIEEE754;
 
 case clang::BuiltinType::ObjCClass:



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


[Lldb-commits] [lldb] ac312a9 - [lldb] Silence compiler warnings from 37cbd817d3e2b8c673862e2eb262cad6dd3dd244

2021-09-06 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-09-06T13:04:21+02:00
New Revision: ac312a9d7c03f0be53834d3f295f1971aaf54649

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

LOG: [lldb] Silence compiler warnings from 
37cbd817d3e2b8c673862e2eb262cad6dd3dd244

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:3638:30:
 error: moving a temporary object prevents copy elision 
[-Werror,-Wpessimizing-move]
return SendErrorResponse(std::move(ret.takeError()));
 ^
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:3638:30:
 note: remove std::move call here
return SendErrorResponse(std::move(ret.takeError()));
 ^~   ~
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp:3622:8:
 error: unused variable 'cf' [-Werror,-Wunused-variable]
  bool cf = packet_str.consume_front("qSaveCore");

Added: 


Modified: 
lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 5d0ce3a6ef85..d40e5eb631e9 100644
--- 
a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ 
b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -3619,9 +3619,8 @@ GDBRemoteCommunicationServerLLGS::Handle_qSaveCore(
   std::string path_hint;
 
   StringRef packet_str{packet.GetStringRef()};
-  bool cf = packet_str.consume_front("qSaveCore");
-  assert(cf);
-  if (packet_str.consume_front(";")) {
+  assert(packet_str.startswith("qSaveCore"));
+  if (packet_str.consume_front("qSaveCore;")) {
 llvm::SmallVector fields;
 packet_str.split(fields, ';');
 
@@ -3635,7 +3634,7 @@ GDBRemoteCommunicationServerLLGS::Handle_qSaveCore(
 
   llvm::Expected ret = m_current_process->SaveCore(path_hint);
   if (!ret)
-return SendErrorResponse(std::move(ret.takeError()));
+return SendErrorResponse(ret.takeError());
 
   StreamString response;
   response.PutCString("core-path:");



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


[Lldb-commits] [lldb] 3806b38 - [LLDB] Initialize temporary token

2020-03-30 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2020-03-30T16:12:50+02:00
New Revision: 3806b38045c08c674dc5db65bb06cf3dc34b9cc7

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

LOG: [LLDB] Initialize temporary token

Found by msan.

Added: 


Modified: 
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp

Removed: 




diff  --git a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp 
b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
index a834be96444d..eca36fff18f8 100644
--- a/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
+++ b/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
@@ -347,7 +347,7 @@ bool CPlusPlusNameParser::ConsumeOperator() {
   // If we find ( or < then this is indeed operator<< no need for fix.
   if (n_token.getKind() != tok::l_paren && n_token.getKind() != tok::less) 
{
 clang::Token tmp_tok;
-
+tmp_tok.startToken();
 tmp_tok.setLength(1);
 tmp_tok.setLocation(token.getLocation().getLocWithOffset(1));
 tmp_tok.setKind(tok::less);



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


[Lldb-commits] [lldb] e8f13f4 - Replace std::string::find == 0 with StringRef::startswith

2020-03-31 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2020-03-31T21:01:09+02:00
New Revision: e8f13f4f62f52067cadb55f3c746ccf9d26ee2ce

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

LOG: Replace std::string::find == 0 with StringRef::startswith

This is both more readable and faster. Found by clang-tidy's
abseil-string-find-startswith.

Added: 


Modified: 
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/unittests/Analysis/CloneDetectionTest.cpp
lldb/source/Core/Module.cpp

lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Symbol/Variable.cpp

Removed: 




diff  --git a/clang/lib/Driver/ToolChains/Arch/AArch64.cpp 
b/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
index dc31a5ab7b0f..b21cfac6e7ed 100644
--- a/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/AArch64.cpp
@@ -140,7 +140,8 @@ getAArch64MicroArchFeaturesFromMtune(const Driver &D, 
StringRef Mtune,
   // Handle CPU name is 'native'.
   if (MtuneLowerCase == "native")
 MtuneLowerCase = std::string(llvm::sys::getHostCPUName());
-  if (MtuneLowerCase == "cyclone" || MtuneLowerCase.find("apple") == 0) {
+  if (MtuneLowerCase == "cyclone" ||
+  StringRef(MtuneLowerCase).startswith("apple")) {
 Features.push_back("+zcm");
 Features.push_back("+zcz");
   }

diff  --git a/clang/unittests/Analysis/CloneDetectionTest.cpp 
b/clang/unittests/Analysis/CloneDetectionTest.cpp
index 03b63c400434..e09d0733f044 100644
--- a/clang/unittests/Analysis/CloneDetectionTest.cpp
+++ b/clang/unittests/Analysis/CloneDetectionTest.cpp
@@ -42,7 +42,7 @@ class NoBarFunctionConstraint {
   for (const StmtSequence &Arg : {A, B}) {
 if (const auto *D =
 dyn_cast(Arg.getContainingDecl())) {
-  if (D->getNameAsString().find("bar") == 0)
+  if (StringRef(D->getNameAsString()).startswith("bar"))
 return false;
 }
   }

diff  --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index cff74dc9d518..fefc23a9b1c5 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1414,7 +1414,7 @@ void Module::SetSymbolFileFileSpec(const FileSpec &file) {
 if (FileSystem::Instance().IsDirectory(file)) {
   std::string new_path(file.GetPath());
   std::string old_path(obj_file->GetFileSpec().GetPath());
-  if (old_path.find(new_path) == 0) {
+  if (llvm::StringRef(old_path).startswith(new_path)) {
 // We specified the same bundle as the symbol file that we already
 // have
 return;

diff  --git 
a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp 
b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
index 47c7ae8c8d63..83cf9f8bd269 100644
--- 
a/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
+++ 
b/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
@@ -88,7 +88,7 @@ ObjectContainerBSDArchive::Object::Extract(const 
DataExtractor &data,
 return LLDB_INVALID_OFFSET;
 
   str.assign((const char *)data.GetData(&offset, 16), 16);
-  if (str.find("#1/") == 0) {
+  if (llvm::StringRef(str).startswith("#1/")) {
 // If the name is longer than 16 bytes, or contains an embedded space then
 // it will use this format where the length of the name is here and the
 // name characters are after this header.

diff  --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp 
b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index f5c84c6a6151..5044bed309dc 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -5140,10 +5140,10 @@ uint32_t 
ObjectFileMachO::GetDependentModules(FileSpecList &files) {
   std::string loader_path("@loader_path");
   std::string executable_path("@executable_path");
   for (auto &rpath : rpath_paths) {
-if (rpath.find(loader_path) == 0) {
+if (llvm::StringRef(rpath).startswith(loader_path)) {
   rpath.erase(0, loader_path.size());
   rpath.insert(0, this_file_spec.GetDirectory().GetCString());
-} else if (rpath.find(executable_path) == 0) {
+} else if (llvm::StringRef(rpath).startswith(executable_path)) {
   rpath.erase(0, executable_path.size());
   rpath.insert(0, this_file_spec.GetDirectory().GetCString());
 }

diff  --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp 
b/lldb/source/Plugins/Process/gdb-remote/ProcessGD

[Lldb-commits] [lldb] 873b79b - Don't access reference to a vector after pop_back

2020-04-07 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2020-04-07T23:10:58+02:00
New Revision: 873b79b8675d0c8eca6055ae8a874fe52b033c28

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

LOG: Don't access reference to a vector after pop_back

This is undefined behavior. Found by asan's detect_container_overflow.

Added: 


Modified: 
lldb/source/Target/ThreadPlanStack.cpp

Removed: 




diff  --git a/lldb/source/Target/ThreadPlanStack.cpp 
b/lldb/source/Target/ThreadPlanStack.cpp
index 44e47f385a82..c51946aae71c 100644
--- a/lldb/source/Target/ThreadPlanStack.cpp
+++ b/lldb/source/Target/ThreadPlanStack.cpp
@@ -156,7 +156,7 @@ void ThreadPlanStack::PushPlan(lldb::ThreadPlanSP 
new_plan_sp) {
 lldb::ThreadPlanSP ThreadPlanStack::PopPlan() {
   assert(m_plans.size() > 1 && "Can't pop the base thread plan");
 
-  lldb::ThreadPlanSP &plan_sp = m_plans.back();
+  lldb::ThreadPlanSP plan_sp = std::move(m_plans.back());
   m_completed_plans.push_back(plan_sp);
   plan_sp->WillPop();
   m_plans.pop_back();
@@ -166,7 +166,7 @@ lldb::ThreadPlanSP ThreadPlanStack::PopPlan() {
 lldb::ThreadPlanSP ThreadPlanStack::DiscardPlan() {
   assert(m_plans.size() > 1 && "Can't discard the base thread plan");
 
-  lldb::ThreadPlanSP &plan_sp = m_plans.back();
+  lldb::ThreadPlanSP plan_sp = std::move(m_plans.back());
   m_discarded_plans.push_back(plan_sp);
   plan_sp->WillPop();
   m_plans.pop_back();



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


[Lldb-commits] [lldb] 2dbe88d - [lldb] Fix up SysV ABI implementations after 057efa9916cdc354ef4653bcd128a578cc43125e

2021-02-12 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-02-13T01:34:00+01:00
New Revision: 2dbe88db5804f32c6dfc1aa474881c3cb7a61d03

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

LOG: [lldb] Fix up SysV ABI implementations after 
057efa9916cdc354ef4653bcd128a578cc43125e

Added: 


Modified: 
lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp
lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp

Removed: 




diff  --git a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp 
b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
index be8586722d8f..60cdbc534113 100644
--- a/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
+++ b/lldb/source/Plugins/ABI/ARC/ABISysV_arc.cpp
@@ -466,7 +466,7 @@ ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
 if (!SetSizedInteger(value.GetScalar(), raw_value, byte_size, is_signed))
   return ValueObjectSP();
 
-value.SetValueType(Value::eValueTypeScalar);
+value.SetValueType(Value::ValueType::Scalar);
   }
   // Pointer return type.
   else if (type_flags & eTypeIsPointer) {
@@ -474,7 +474,7 @@ ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
 LLDB_REGNUM_GENERIC_ARG1);
 value.GetScalar() = reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0);
 
-value.SetValueType(Value::eValueTypeScalar);
+value.SetValueType(Value::ValueType::Scalar);
   }
   // Floating point return type.
   else if (type_flags & eTypeIsFloat) {
@@ -537,7 +537,7 @@ ValueObjectSP ABISysV_arc::GetReturnValueObjectImpl(Thread 
&thread,
 auto reg_info_r0 = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
 LLDB_REGNUM_GENERIC_ARG1);
 value.GetScalar() = reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0);
-value.SetValueType(Value::eValueTypeScalar);
+value.SetValueType(Value::ValueType::Scalar);
   }
   // Floating point return type.
   else if (retType.isFloatingPointTy()) {

diff  --git a/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp 
b/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp
index 751555722dac..5e72af076f66 100644
--- a/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp
+++ b/lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp
@@ -764,7 +764,7 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
   const RegisterInfo *r3_info = reg_ctx->GetRegisterInfoByName("r3", 0);
 
   if (type_flags & eTypeIsScalar || type_flags & eTypeIsPointer) {
-value.SetValueType(Value::eValueTypeScalar);
+value.SetValueType(Value::ValueType::Scalar);
 
 bool success = false;
 if (type_flags & eTypeIsInteger || type_flags & eTypeIsPointer) {

diff  --git a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp 
b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
index 91d2e59ed632..d5605642d623 100644
--- a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
+++ b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp
@@ -520,7 +520,7 @@ ValueObjectSP ABISysV_ppc::GetReturnValueObjectSimple(
 
   const uint32_t type_flags = return_compiler_type.GetTypeInfo();
   if (type_flags & eTypeIsScalar) {
-value.SetValueType(Value::eValueTypeScalar);
+value.SetValueType(Value::ValueType::Scalar);
 
 bool success = false;
 if (type_flags & eTypeIsInteger) {
@@ -603,7 +603,7 @@ ValueObjectSP ABISysV_ppc::GetReturnValueObjectSimple(
 reg_ctx->GetRegisterInfoByName("r3", 0)->kinds[eRegisterKindLLDB];
 value.GetScalar() =
 (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(r3_id, 
0);
-value.SetValueType(Value::eValueTypeScalar);
+value.SetValueType(Value::ValueType::Scalar);
 return_valobj_sp = ValueObjectConstResult::Create(
 thread.GetStackFrameAtIndex(0).get(), value, ConstString(""));
   } else if (type_flags & eTypeIsVector) {

diff  --git a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp 
b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
index c7cb7736df9f..603143190dc5 100644
--- a/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
+++ b/lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp
@@ -577,7 +577,7 @@ class ReturnValueExtractor {
   ValueSP NewScalarValue(CompilerType &type) {
 ValueSP value_sp(new Value);
 value_sp->SetCompilerType(type);
-value_sp->SetValueType(Value::eValueTypeScalar);
+value_sp->SetValueType(Value::ValueType::Scalar);
 return value_sp;
   }
 

diff  --git a/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp 
b/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
index 22a64170017b..88e85111d871 100644
--- a/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
+++ b/lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp
@@ -487,7 +487,7 @@ ValueObjectSP 

[Lldb-commits] [lldb] 99c24f7 - [lldb/Interpreter] Pacify -Wnon-virtual-dtor

2021-03-01 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-03-01T11:20:14+01:00
New Revision: 99c24f7aa8ccb84abde1672255439a2b2730ccc1

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

LOG: [lldb/Interpreter] Pacify -Wnon-virtual-dtor

Added: 


Modified: 
lldb/unittests/Interpreter/TestOptionValue.cpp

Removed: 




diff  --git a/lldb/unittests/Interpreter/TestOptionValue.cpp 
b/lldb/unittests/Interpreter/TestOptionValue.cpp
index a059b9c67eaa..b31422e0259b 100644
--- a/lldb/unittests/Interpreter/TestOptionValue.cpp
+++ b/lldb/unittests/Interpreter/TestOptionValue.cpp
@@ -14,6 +14,7 @@ using namespace lldb_private;
 
 class Callback {
 public:
+  virtual ~Callback() = default;
   virtual void Invoke() const {}
   void operator()() const { Invoke(); }
 };



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


[Lldb-commits] [lldb] edc869c - [lldb-vscode] Use a DenseMap to pacify overly aggressive linters

2021-04-22 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2021-04-22T13:07:39+02:00
New Revision: edc869cb57fb4cf999c8a388b48ae4ecd027bfe7

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

LOG: [lldb-vscode] Use a DenseMap to pacify overly aggressive linters

Some linters get rather upset upon seeing
`std::unordered_map
 #include 
 #include 
-#include 
 #include 
 
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/ScopeExit.h"
 #include "llvm/Option/Arg.h"
 #include "llvm/Option/ArgList.h"
@@ -2931,7 +2931,7 @@ void request_variables(const llvm::json::Object &request) 
{
 const int64_t end_idx = start_idx + ((count == 0) ? num_children : count);
 
 // We first find out which variable names are duplicated
-std::unordered_map variable_name_counts;
+llvm::DenseMap variable_name_counts;
 for (auto i = start_idx; i < end_idx; ++i) {
   lldb::SBValue variable = g_vsc.variables.GetValueAtIndex(i);
   if (!variable.IsValid())



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


[Lldb-commits] [lldb] 642cb78 - Copy m_plan_is_for_signal_trap member.

2020-08-26 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2020-08-26T13:27:01+02:00
New Revision: 642cb7865f35ad7dbac78d716fcddaff561e8639

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

LOG: Copy m_plan_is_for_signal_trap member.

Otherwise it would stay uninitialized. Found by msan.

Added: 


Modified: 
lldb/include/lldb/Symbol/UnwindPlan.h

Removed: 




diff  --git a/lldb/include/lldb/Symbol/UnwindPlan.h 
b/lldb/include/lldb/Symbol/UnwindPlan.h
index 8902b5f4eaa7..40814da3de4a 100644
--- a/lldb/include/lldb/Symbol/UnwindPlan.h
+++ b/lldb/include/lldb/Symbol/UnwindPlan.h
@@ -393,6 +393,7 @@ class UnwindPlan {
 m_plan_is_sourced_from_compiler(rhs.m_plan_is_sourced_from_compiler),
 m_plan_is_valid_at_all_instruction_locations(
 rhs.m_plan_is_valid_at_all_instruction_locations),
+m_plan_is_for_signal_trap(rhs.m_plan_is_for_signal_trap),
 m_lsda_address(rhs.m_lsda_address),
 m_personality_func_addr(rhs.m_personality_func_addr) {
 m_row_list.reserve(rhs.m_row_list.size());



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


[Lldb-commits] [lldb] 5e30780 - Correct size_t format specifier

2019-10-26 Thread Benjamin Kramer via lldb-commits

Author: Shu-Chun Weng
Date: 2019-10-26T10:38:06+02:00
New Revision: 5e307808557f4786c6438c9cfd67784073c5a3b7

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

LOG: Correct size_t format specifier

Differential Revision: https://reviews.llvm.org/D69455

Added: 


Modified: 
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp 
b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index 0c48ac498ec8..15c3e241fce7 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -1257,7 +1257,7 @@ Status 
ScriptInterpreterPythonImpl::SetBreakpointCommandCallbackFunction(
 oneliner += "(frame, bp_loc, internal_dict)";
   } else {
 error.SetErrorStringWithFormat("expected 3 or 4 argument "
-   "function, %s has %d",
+   "function, %s has %zu",
function_name, num_args);
 return error;
   }



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


[Lldb-commits] [lldb] eb12b3b - Silence warning, PyMODINIT_FUNC already contains extern "C"

2019-11-06 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2019-11-06T12:27:11+01:00
New Revision: eb12b3b8a3e5f41a6ab84f94dfc85551f92bc2ea

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

LOG: Silence warning, PyMODINIT_FUNC already contains extern "C"

PythonReadline.h:22:12: warning: duplicate 'extern' declaration specifier 
[-Wduplicate-decl-specifier]

Added: 


Modified: 
lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h

Removed: 




diff  --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h 
b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
index faf95bb64486..4f25c46eefa8 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
@@ -19,7 +19,7 @@
 //
 #define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1
 
-extern "C" PyMODINIT_FUNC initlldb_readline(void);
+PyMODINIT_FUNC initlldb_readline(void);
 
 #endif
 



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


[Lldb-commits] [lldb] 3badd17 - SmallPtrSet::find -> SmallPtrSet::count

2020-06-07 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2020-06-07T22:38:08+02:00
New Revision: 3badd17b6989621b5aa2732800f697dabbda034d

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

LOG: SmallPtrSet::find -> SmallPtrSet::count

The latter is more readable and more efficient. While there clean up
some double lookups. NFCI.

Added: 


Modified: 
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
llvm/lib/Analysis/DependenceGraphBuilder.cpp
llvm/lib/Analysis/StackSafetyAnalysis.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Target/AMDGPU/GCNMinRegStrategy.cpp
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/lib/Transforms/Scalar/LoopInterchange.cpp
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
llvm/lib/Transforms/Utils/BypassSlowDivision.cpp
llvm/lib/Transforms/Utils/Local.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/tools/bugpoint/CrashDebugger.cpp

Removed: 




diff  --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp 
b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
index 9b6369aee7a8..ed62778623a8 100644
--- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
@@ -973,9 +973,8 @@ static std::string getMacroNameAndPrintExpansion(
   // in this case we don't get the full expansion text in the Plist file. See
   // the test file where "value" is expanded to "garbage_" instead of
   // "garbage_value".
-  if (AlreadyProcessedTokens.find(IDInfo) != AlreadyProcessedTokens.end())
+  if (!AlreadyProcessedTokens.insert(IDInfo).second)
 return Info.Name;
-  AlreadyProcessedTokens.insert(IDInfo);
 
   if (!Info.MI)
 return Info.Name;

diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp 
b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
index 2a21e5e0d7b9..27efad214476 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
@@ -1025,7 +1025,7 @@ void 
ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
 
   // Some decls shouldn't be tracked here because they were not created by
   // copying 'from' to 'to'. Just exit early for those.
-  if (m_decls_to_ignore.find(to) != m_decls_to_ignore.end())
+  if (m_decls_to_ignore.count(to))
 return clang::ASTImporter::Imported(from, to);
 
   // Transfer module ownership information.

diff  --git a/llvm/lib/Analysis/DependenceGraphBuilder.cpp 
b/llvm/lib/Analysis/DependenceGraphBuilder.cpp
index 67304a495960..7a98d844e4cb 100644
--- a/llvm/lib/Analysis/DependenceGraphBuilder.cpp
+++ b/llvm/lib/Analysis/DependenceGraphBuilder.cpp
@@ -435,9 +435,8 @@ template  void 
AbstractDependenceGraphBuilder::simplify() {
 NodeType &Src = *Worklist.pop_back_val();
 // As nodes get merged, we need to skip any node that has been removed from
 // the candidate set (see below).
-if (CandidateSourceNodes.find(&Src) == CandidateSourceNodes.end())
+if (!CandidateSourceNodes.erase(&Src))
   continue;
-CandidateSourceNodes.erase(&Src);
 
 assert(Src.getEdges().size() == 1 &&
"Expected a single edge from the candidate src node.");
@@ -470,10 +469,9 @@ template  void 
AbstractDependenceGraphBuilder::simplify() {
 // We also need to remove the old target (b), from the worklist. We first
 // remove it from the candidate set here, and skip any item from the
 // worklist that is not in the set.
-if (CandidateSourceNodes.find(&Tgt) != CandidateSourceNodes.end()) {
+if (CandidateSourceNodes.erase(&Tgt)) {
   Worklist.push_back(&Src);
   CandidateSourceNodes.insert(&Src);
-  CandidateSourceNodes.erase(&Tgt);
   LLVM_DEBUG(dbgs() << "Putting " << &Src << " back in the worklist.\n");
 }
   }

diff  --git a/llvm/lib/Analysis/StackSafetyAnalysis.cpp 
b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
index dd4ba86df7ca..9d96e9d5d075 100644
--- a/llvm/lib/Analysis/StackSafetyAnalysis.cpp
+++ b/llvm/lib/Analysis/StackSafetyAnalysis.cpp
@@ -684,7 +684,7 @@ StackSafetyGlobalInfo::~StackSafetyGlobalInfo() = default;
 
 bool StackSafetyGlobalInfo::isSafe(const AllocaInst &AI) const {
   const auto &Info = getInfo();
-  return Info.SafeAllocas.find(&AI) != Info.SafeAllocas.end();
+  return Info.SafeAllocas.count(&AI);
 }
 
 void StackSafetyGlobalInfo::print(raw_ostream &O) const {

diff  --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 1c9023a349c2..eae7c03d744e 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -2613,8 +2613,7 @@ void Verifier::visitCallBrInst(CallBrInst &CBI) {
   if (auto *BA = dyn_cast(V))
 ArgBBs.insert(BA->getBa

[Lldb-commits] [lldb] 19580c3 - Fix implicit conversion in the lldb Python plugin

2020-01-28 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2020-01-29T00:07:50+01:00
New Revision: 19580c3755a1dc198005839a73a7bad5c108f203

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

LOG: Fix implicit conversion in the lldb Python plugin

Added: 


Modified: 
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp

Removed: 




diff  --git 
a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp 
b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index b659957f8dc4..92060ee08cdc 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -58,7 +58,7 @@ Expected 
python::As(Expected &&obj) {
   auto utf8 = str.AsUTF8();
   if (!utf8)
 return utf8.takeError();
-  return utf8.get();
+  return std::string(utf8.get());
 }
 
 void StructuredPythonObject::Serialize(llvm::json::OStream &s) const {



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


[Lldb-commits] [lldb] 9c80eb7 - Silence -Wswitch after cb43021e5726a4462f28a999fb66a8dc20dc354b

2024-10-17 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2024-10-17T13:15:05+02:00
New Revision: 9c80eb7c83c6471d4126ef46f85bf673787de521

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

LOG: Silence -Wswitch after cb43021e5726a4462f28a999fb66a8dc20dc354b

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4885:13: warning: 
enumeration value 'SveMFloat8' not handled in switch [-Wswitch]
 4885 | switch (llvm::cast(qual_type)->getKind()) {
  |

Added: 


Modified: 
lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Removed: 




diff  --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp 
b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index fe0c53a7e9a3ea..50115a638b9589 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -5065,6 +5065,7 @@ lldb::Encoding 
TypeSystemClang::GetEncoding(lldb::opaque_compiler_type_t type,
 case clang::BuiltinType::SveUint64x2:
 case clang::BuiltinType::SveUint64x3:
 case clang::BuiltinType::SveUint64x4:
+case clang::BuiltinType::SveMFloat8:
 case clang::BuiltinType::SveFloat16:
 case clang::BuiltinType::SveBFloat16:
 case clang::BuiltinType::SveBFloat16x2:



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


[Lldb-commits] [lldb] 81898ac - Revert "[lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (#120457)"

2025-01-08 Thread Benjamin Kramer via lldb-commits

Author: Benjamin Kramer
Date: 2025-01-08T15:49:46+01:00
New Revision: 81898ac00e04ed3f352534a810829bdf4e6e14b7

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

LOG: Revert "[lldb-dap] Ensure the IO forwarding threads are managed by the DAP 
object lifecycle. (#120457)"

This reverts commit 0d9cf2671e06c9124a0b5fc753330c39c8b4a791. Breaks the
lldb-aarch64-windows buildbot.

Added: 


Modified: 
lldb/tools/lldb-dap/CMakeLists.txt
lldb/tools/lldb-dap/DAP.cpp
lldb/tools/lldb-dap/DAP.h
lldb/tools/lldb-dap/IOStream.h
lldb/tools/lldb-dap/OutputRedirector.cpp
lldb/tools/lldb-dap/OutputRedirector.h
lldb/tools/lldb-dap/lldb-dap.cpp

Removed: 




diff  --git a/lldb/tools/lldb-dap/CMakeLists.txt 
b/lldb/tools/lldb-dap/CMakeLists.txt
index 43fc18873feb33..d68098bf7b3266 100644
--- a/lldb/tools/lldb-dap/CMakeLists.txt
+++ b/lldb/tools/lldb-dap/CMakeLists.txt
@@ -1,3 +1,7 @@
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" 
)
+  list(APPEND extra_libs lldbHost)
+endif ()
+
 if (HAVE_LIBPTHREAD)
   list(APPEND extra_libs pthread)
 endif ()
@@ -22,11 +26,9 @@ add_lldb_tool(lldb-dap
   lldb-dap.cpp
   Breakpoint.cpp
   BreakpointBase.cpp
-  DAP.cpp
   ExceptionBreakpoint.cpp
   FifoFiles.cpp
   FunctionBreakpoint.cpp
-  InstructionBreakpoint.cpp
   IOStream.cpp
   JSONUtils.cpp
   LLDBUtils.cpp
@@ -34,11 +36,12 @@ add_lldb_tool(lldb-dap
   ProgressEvent.cpp
   RunInTerminal.cpp
   SourceBreakpoint.cpp
+  DAP.cpp
   Watchpoint.cpp
+  InstructionBreakpoint.cpp
 
   LINK_LIBS
 liblldb
-lldbHost
 ${extra_libs}
 
   LINK_COMPONENTS

diff  --git a/lldb/tools/lldb-dap/DAP.cpp b/lldb/tools/lldb-dap/DAP.cpp
index a67abe582abd40..35250d9eef608a 100644
--- a/lldb/tools/lldb-dap/DAP.cpp
+++ b/lldb/tools/lldb-dap/DAP.cpp
@@ -6,62 +6,34 @@
 //
 
//===--===//
 
+#include 
+#include 
+#include 
+#include 
+
 #include "DAP.h"
 #include "JSONUtils.h"
 #include "LLDBUtils.h"
-#include "OutputRedirector.h"
-#include "lldb/API/SBBreakpoint.h"
 #include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandReturnObject.h"
 #include "lldb/API/SBLanguageRuntime.h"
 #include "lldb/API/SBListener.h"
-#include "lldb/API/SBProcess.h"
 #include "lldb/API/SBStream.h"
-#include "lldb/Host/FileSystem.h"
-#include "lldb/Utility/Status.h"
-#include "lldb/lldb-defines.h"
-#include "lldb/lldb-enumerations.h"
-#include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/Twine.h"
-#include "llvm/Support/Error.h"
-#include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FormatVariadic.h"
-#include "llvm/Support/raw_ostream.h"
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
 #if defined(_WIN32)
 #define NOMINMAX
 #include 
 #include 
 #include 
-#else
-#include 
 #endif
 
 using namespace lldb_dap;
 
-namespace {
-#ifdef _WIN32
-const char DEV_NULL[] = "nul";
-#else
-const char DEV_NULL[] = "/dev/null";
-#endif
-} // namespace
-
 namespace lldb_dap {
 
-DAP::DAP(llvm::StringRef path, std::ofstream *log, ReplMode repl_mode,
- StreamDescriptor input, StreamDescriptor output)
-: debug_adaptor_path(path), log(log), input(std::move(input)),
-  output(std::move(output)), broadcaster("lldb-dap"),
+DAP::DAP(llvm::StringRef path, ReplMode repl_mode)
+: debug_adaptor_path(path), broadcaster("lldb-dap"),
   exception_breakpoints(), focus_tid(LLDB_INVALID_THREAD_ID),
   stop_at_entry(false), is_attach(false),
   enable_auto_variable_summaries(false),
@@ -71,7 +43,21 @@ DAP::DAP(llvm::StringRef path, std::ofstream *log, ReplMode 
repl_mode,
   configuration_done_sent(false), waiting_for_run_in_terminal(false),
   progress_event_reporter(
   [&](const ProgressEvent &event) { SendJSON(event.ToJSON()); }),
-  reverse_request_seq(0), repl_mode(repl_mode) {}
+  reverse_request_seq(0), repl_mode(repl_mode) {
+  const char *log_file_path = getenv("LLDBDAP_LOG");
+#if defined(_WIN32)
+  // Windows opens stdout and stdin in text mode which converts \n to 13,10
+  // while the value is just 10 on Darwin/Linux. Setting the file mode to 
binary
+  // fixes this.
+  int result = _setmode(fileno(stdout), _O_BINARY);
+  assert(result);
+  result = _setmode(fileno(stdin), _O_BINARY);
+  UNUSED_IF_ASSERT_DISABLED(result);
+  assert(result);
+#endif
+  if (log_file_path)
+log.reset(new std::ofstream(log_file_path));
+}
 
 DAP::~DAP() = default;
 
@@ -187,45 +173,6 @@ ExceptionBreakpoint *DAP::GetExceptionBreakpoint(const 
lldb::break_id_t bp_id) {
   return nullptr;
 }
 
-llvm::Error DAP::ConfigureIO(std::FILE *overrideOut, std::FILE *overrideErr) {
-  in = lldb::SBFile(std::fopen(DEV_NULL

[Lldb-commits] [lldb] [lldb-dap] Ensure the IO forwarding threads are managed by the DAP object lifecycle. (PR #120457)

2025-01-08 Thread Benjamin Kramer via lldb-commits

d0k wrote:

Reverted this in 81898ac00e04ed3f352534a810829bdf4e6e14b7. Apart from breaking 
windows, I'm also seeing some weirdness when debugging iOS apps with this 
change, don't know what's going on.

https://github.com/llvm/llvm-project/pull/120457
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits