[Lldb-commits] [lldb] 2c7d10c - [lldb] Set result error state in 'frame variable'

2022-01-08 Thread Dave Lee via lldb-commits

Author: Dave Lee
Date: 2022-01-08T08:50:17-08:00
New Revision: 2c7d10c41278181e3e45c68f28b501cd95193a8a

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

LOG: [lldb] Set result error state in 'frame variable'

Ensure that errors in `frame variable` are reflected in result object.

The statistics for `frame variable` show invocations as being successful, even
when executing one of the error paths.

This change replaces `result.GetErrorStream()` with `result.AppendError()`,
which also sets the status to `eReturnStatusFailed`.

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

Added: 


Modified: 
lldb/source/Commands/CommandObjectFrame.cpp

Removed: 




diff  --git a/lldb/source/Commands/CommandObjectFrame.cpp 
b/lldb/source/Commands/CommandObjectFrame.cpp
index 9cfe997f92274..8dd1a79d38959 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -558,18 +558,16 @@ may even involve JITing and running code in the target 
program.)");
   }
 }
   } else if (num_matches == 0) {
-result.GetErrorStream().Printf("error: no variables matched "
-   "the regular expression 
'%s'.\n",
-   entry.c_str());
+result.AppendErrorWithFormat(
+"no variables matched the regular expression '%s'.",
+entry.c_str());
   }
 } else {
   if (llvm::Error err = regex.GetError())
-result.GetErrorStream().Printf(
-"error: %s\n", llvm::toString(std::move(err)).c_str());
+result.AppendError(llvm::toString(std::move(err)));
   else
-result.GetErrorStream().Printf(
-"error: unknown regex error when compiling '%s'\n",
-entry.c_str());
+result.AppendErrorWithFormat(
+"unknown regex error when compiling '%s'", entry.c_str());
 }
   } else // No regex, either exact variable names or variable
  // expressions.
@@ -605,14 +603,13 @@ may even involve JITing and running code in the target 
program.)");
   valobj_sp->GetParent() ? entry.c_str() : nullptr);
   valobj_sp->Dump(output_stream, options);
 } else {
-  const char *error_cstr = error.AsCString(nullptr);
-  if (error_cstr)
-result.GetErrorStream().Printf("error: %s\n", error_cstr);
+  if (auto error_cstr = error.AsCString(nullptr))
+result.AppendError(error_cstr);
   else
-result.GetErrorStream().Printf("error: unable to find any "
-   "variable expression path that "
-   "matches '%s'.\n",
-   entry.c_str());
+result.AppendErrorWithFormat(
+"unable to find any variable expression path that matches "
+"'%s'.",
+entry.c_str());
 }
   }
 }
@@ -680,7 +677,8 @@ may even involve JITing and running code in the target 
program.)");
   }
 }
   }
-  result.SetStatus(eReturnStatusSuccessFinishResult);
+  if (result.GetStatus() != eReturnStatusFailed)
+result.SetStatus(eReturnStatusSuccessFinishResult);
 }
 
 if (m_option_variable.show_recognized_args) {



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


[Lldb-commits] [PATCH] D116788: [lldb] Set result error state in 'frame variable'

2022-01-08 Thread Dave Lee via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2c7d10c41278: [lldb] Set result error state in 'frame 
variable' (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116788

Files:
  lldb/source/Commands/CommandObjectFrame.cpp


Index: lldb/source/Commands/CommandObjectFrame.cpp
===
--- lldb/source/Commands/CommandObjectFrame.cpp
+++ lldb/source/Commands/CommandObjectFrame.cpp
@@ -558,18 +558,16 @@
   }
 }
   } else if (num_matches == 0) {
-result.GetErrorStream().Printf("error: no variables matched "
-   "the regular expression 
'%s'.\n",
-   entry.c_str());
+result.AppendErrorWithFormat(
+"no variables matched the regular expression '%s'.",
+entry.c_str());
   }
 } else {
   if (llvm::Error err = regex.GetError())
-result.GetErrorStream().Printf(
-"error: %s\n", llvm::toString(std::move(err)).c_str());
+result.AppendError(llvm::toString(std::move(err)));
   else
-result.GetErrorStream().Printf(
-"error: unknown regex error when compiling '%s'\n",
-entry.c_str());
+result.AppendErrorWithFormat(
+"unknown regex error when compiling '%s'", entry.c_str());
 }
   } else // No regex, either exact variable names or variable
  // expressions.
@@ -605,14 +603,13 @@
   valobj_sp->GetParent() ? entry.c_str() : nullptr);
   valobj_sp->Dump(output_stream, options);
 } else {
-  const char *error_cstr = error.AsCString(nullptr);
-  if (error_cstr)
-result.GetErrorStream().Printf("error: %s\n", error_cstr);
+  if (auto error_cstr = error.AsCString(nullptr))
+result.AppendError(error_cstr);
   else
-result.GetErrorStream().Printf("error: unable to find any "
-   "variable expression path that "
-   "matches '%s'.\n",
-   entry.c_str());
+result.AppendErrorWithFormat(
+"unable to find any variable expression path that matches "
+"'%s'.",
+entry.c_str());
 }
   }
 }
@@ -680,7 +677,8 @@
   }
 }
   }
-  result.SetStatus(eReturnStatusSuccessFinishResult);
+  if (result.GetStatus() != eReturnStatusFailed)
+result.SetStatus(eReturnStatusSuccessFinishResult);
 }
 
 if (m_option_variable.show_recognized_args) {


Index: lldb/source/Commands/CommandObjectFrame.cpp
===
--- lldb/source/Commands/CommandObjectFrame.cpp
+++ lldb/source/Commands/CommandObjectFrame.cpp
@@ -558,18 +558,16 @@
   }
 }
   } else if (num_matches == 0) {
-result.GetErrorStream().Printf("error: no variables matched "
-   "the regular expression '%s'.\n",
-   entry.c_str());
+result.AppendErrorWithFormat(
+"no variables matched the regular expression '%s'.",
+entry.c_str());
   }
 } else {
   if (llvm::Error err = regex.GetError())
-result.GetErrorStream().Printf(
-"error: %s\n", llvm::toString(std::move(err)).c_str());
+result.AppendError(llvm::toString(std::move(err)));
   else
-result.GetErrorStream().Printf(
-"error: unknown regex error when compiling '%s'\n",
-entry.c_str());
+result.AppendErrorWithFormat(
+"unknown regex error when compiling '%s'", entry.c_str());
 }
   } else // No regex, either exact variable names or variable
  // expressions.
@@ -605,14 +603,13 @@
   valobj_sp->GetParent() ? entry.c_str() : nullptr);
   valobj_sp->Dump(output_stream, options);
 } else {
-  const char *error_cstr = error.AsCString(nullptr);
-  if (error_cstr)
-result.GetErrorStream().Printf("error: %s\n", error_cstr);
+  if (auto error_cstr = error.AsCString(nullptr))
+result.AppendError(error_cstr);
   else
-

[Lldb-commits] [PATCH] D116461: [lldb] Remove ProcessStructReader from NSStringSummaryProvider (NFC)

2022-01-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione added a comment.

To add more context, `ProcessStructReader` is used in only a few places, and 
none seem like they should truly need it. This was a low hanging fruit.

Something I don't understand about this code is why it the objc metadata is 
incomplete. The class is known, but not its ivars, why? In theory this code 
should be able to request the `_lengthAndRefCount` child member directly by 
name.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116461

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


[Lldb-commits] [PATCH] D116461: [lldb] Remove ProcessStructReader from NSStringSummaryProvider (NFC)

2022-01-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 398341.
kastiglione added a comment.

give name to synthetic child


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116461

Files:
  lldb/source/Plugins/Language/ObjC/NSString.cpp


Index: lldb/source/Plugins/Language/ObjC/NSString.cpp
===
--- lldb/source/Plugins/Language/ObjC/NSString.cpp
+++ lldb/source/Plugins/Language/ObjC/NSString.cpp
@@ -8,14 +8,13 @@
 
 #include "NSString.h"
 
-#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/DataFormatters/FormattersHelpers.h"
 #include "lldb/DataFormatters/StringPrinter.h"
 #include "lldb/Target/Language.h"
-#include "lldb/Target/ProcessStructReader.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Endian.h"
 #include "lldb/Utility/Status.h"
@@ -31,24 +30,6 @@
   return g_map;
 }
 
-static CompilerType GetNSPathStore2Type(Target &target) {
-  static ConstString g_type_name("__lldb_autogen_nspathstore2");
-
-  TypeSystemClang *ast_ctx = ScratchTypeSystemClang::GetForTarget(target);
-
-  if (!ast_ctx)
-return CompilerType();
-
-  CompilerType voidstar =
-  ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType();
-  CompilerType uint32 =
-  ast_ctx->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, 32);
-
-  return ast_ctx->GetOrCreateStructForIdentifier(
-  g_type_name,
-  {{"isa", voidstar}, {"lengthAndRef", uint32}, {"buffer", voidstar}});
-}
-
 bool lldb_private::formatters::NSStringSummaryProvider(
 ValueObject &valobj, Stream &stream,
 const TypeSummaryOptions &summary_options) {
@@ -229,11 +210,17 @@
 return StringPrinter::ReadStringAndDumpToStream<
 StringPrinter::StringElementType::UTF16>(options);
   } else if (is_path_store) {
-ProcessStructReader reader(valobj.GetProcessSP().get(),
-   valobj.GetValueAsUnsigned(0),
-   GetNSPathStore2Type(*valobj.GetTargetSP()));
-explicit_length =
-reader.GetField(ConstString("lengthAndRef")) >> 20;
+// _lengthAndRefCount is the first ivar of NSPathStore2 (after the isa).
+uint64_t length_ivar_offset = 1 * ptr_size;
+CompilerType length_type = valobj.GetCompilerType().GetBasicTypeFromAST(
+lldb::eBasicTypeUnsignedInt);
+ValueObjectSP length_valobj_sp =
+valobj.GetSyntheticChildAtOffset(length_ivar_offset, length_type, true,
+ ConstString("_lengthAndRefCount"));
+if (!length_valobj_sp)
+  return false;
+// Get the length out of _lengthAndRefCount.
+explicit_length = length_valobj_sp->GetValueAsUnsigned(0) >> 20;
 lldb::addr_t location = valobj.GetValueAsUnsigned(0) + ptr_size + 4;
 
 options.SetLocation(location);


Index: lldb/source/Plugins/Language/ObjC/NSString.cpp
===
--- lldb/source/Plugins/Language/ObjC/NSString.cpp
+++ lldb/source/Plugins/Language/ObjC/NSString.cpp
@@ -8,14 +8,13 @@
 
 #include "NSString.h"
 
-#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/DataFormatters/FormattersHelpers.h"
 #include "lldb/DataFormatters/StringPrinter.h"
 #include "lldb/Target/Language.h"
-#include "lldb/Target/ProcessStructReader.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Endian.h"
 #include "lldb/Utility/Status.h"
@@ -31,24 +30,6 @@
   return g_map;
 }
 
-static CompilerType GetNSPathStore2Type(Target &target) {
-  static ConstString g_type_name("__lldb_autogen_nspathstore2");
-
-  TypeSystemClang *ast_ctx = ScratchTypeSystemClang::GetForTarget(target);
-
-  if (!ast_ctx)
-return CompilerType();
-
-  CompilerType voidstar =
-  ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType();
-  CompilerType uint32 =
-  ast_ctx->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, 32);
-
-  return ast_ctx->GetOrCreateStructForIdentifier(
-  g_type_name,
-  {{"isa", voidstar}, {"lengthAndRef", uint32}, {"buffer", voidstar}});
-}
-
 bool lldb_private::formatters::NSStringSummaryProvider(
 ValueObject &valobj, Stream &stream,
 const TypeSummaryOptions &summary_options) {
@@ -229,11 +210,17 @@
 return StringPrinter::ReadStringAndDumpToStream<
 StringPrinter::StringElementType::UTF16>(options);
   } else if (is_path_store) {
-ProcessStructReader reader(valobj.GetProcessSP().get(),
-   valobj.GetValueAsUnsigned(0),
-   GetNSPathStore2Type(*valobj.GetTargetSP()));
-explicit_length =
-

[Lldb-commits] [lldb] 930f3c6 - Revert "[lldb] Set result error state in 'frame variable'"

2022-01-08 Thread Dave Lee via lldb-commits

Author: Dave Lee
Date: 2022-01-08T09:35:13-08:00
New Revision: 930f3c625e0277c4a28e66f79df7d8ad0de258e5

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

LOG: Revert "[lldb] Set result error state in 'frame variable'"

This reverts commit 2c7d10c41278181e3e45c68f28b501cd95193a8a.

Added: 


Modified: 
lldb/source/Commands/CommandObjectFrame.cpp

Removed: 




diff  --git a/lldb/source/Commands/CommandObjectFrame.cpp 
b/lldb/source/Commands/CommandObjectFrame.cpp
index 8dd1a79d38959..9cfe997f92274 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -558,16 +558,18 @@ may even involve JITing and running code in the target 
program.)");
   }
 }
   } else if (num_matches == 0) {
-result.AppendErrorWithFormat(
-"no variables matched the regular expression '%s'.",
-entry.c_str());
+result.GetErrorStream().Printf("error: no variables matched "
+   "the regular expression 
'%s'.\n",
+   entry.c_str());
   }
 } else {
   if (llvm::Error err = regex.GetError())
-result.AppendError(llvm::toString(std::move(err)));
+result.GetErrorStream().Printf(
+"error: %s\n", llvm::toString(std::move(err)).c_str());
   else
-result.AppendErrorWithFormat(
-"unknown regex error when compiling '%s'", entry.c_str());
+result.GetErrorStream().Printf(
+"error: unknown regex error when compiling '%s'\n",
+entry.c_str());
 }
   } else // No regex, either exact variable names or variable
  // expressions.
@@ -603,13 +605,14 @@ may even involve JITing and running code in the target 
program.)");
   valobj_sp->GetParent() ? entry.c_str() : nullptr);
   valobj_sp->Dump(output_stream, options);
 } else {
-  if (auto error_cstr = error.AsCString(nullptr))
-result.AppendError(error_cstr);
+  const char *error_cstr = error.AsCString(nullptr);
+  if (error_cstr)
+result.GetErrorStream().Printf("error: %s\n", error_cstr);
   else
-result.AppendErrorWithFormat(
-"unable to find any variable expression path that matches "
-"'%s'.",
-entry.c_str());
+result.GetErrorStream().Printf("error: unable to find any "
+   "variable expression path that "
+   "matches '%s'.\n",
+   entry.c_str());
 }
   }
 }
@@ -677,8 +680,7 @@ may even involve JITing and running code in the target 
program.)");
   }
 }
   }
-  if (result.GetStatus() != eReturnStatusFailed)
-result.SetStatus(eReturnStatusSuccessFinishResult);
+  result.SetStatus(eReturnStatusSuccessFinishResult);
 }
 
 if (m_option_variable.show_recognized_args) {



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


[Lldb-commits] [PATCH] D116863: [lldb] Remove anon struct from frame-var-anon-unions test

2022-01-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione created this revision.
kastiglione added reviewers: JDevlieghere, jingham, aprantl.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

This test for anonymous unions seems off. It tests the following:

  union {
// fields
  };
  
  struct {
// fields
  } var{...};

Both are anonymous types, but the first does not declare a variable and the
second one does. The test then checks that `frame var` can access the fields of
the anonymous union, but can't access the fields of the anonymous struct.

The second test, to access the members of the struct variable, seems pointless
as similar code would not compile. A demonstration:

  struct {
int a;
int z;
  } a_z{23, 45};
  printf("%d\n", a_z.a); // fine
  printf("%d\n", a); // this does not compile

Since we can't directly access the fields in code, I'm not sure there's a
reason to test that lldb also can't access them (other than perhaps as a
regression test).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116863

Files:
  
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
  lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp


Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
@@ -3,11 +3,6 @@
 int i;
 char c;
   };
-  struct {
-int x;
-char y;
-short z;
-  } s{3,'B',14};
   i = 0xFF00;
   c = 'A';
   return c; // break here
Index: 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
===
--- 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -29,7 +29,3 @@
 self.expect('frame variable -f x i', substrs=['4100'])
 
 self.expect('frame variable c', substrs=["'A"])
-
-self.expect('frame variable x', matching=False, substrs=['3'])
-self.expect('frame variable y', matching=False, substrs=["'B'"])
-self.expect('frame variable z', matching=False, substrs=['14'])


Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
@@ -3,11 +3,6 @@
 int i;
 char c;
   };
-  struct {
-int x;
-char y;
-short z;
-  } s{3,'B',14};
   i = 0xFF00;
   c = 'A';
   return c; // break here
Index: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -29,7 +29,3 @@
 self.expect('frame variable -f x i', substrs=['4100'])
 
 self.expect('frame variable c', substrs=["'A"])
-
-self.expect('frame variable x', matching=False, substrs=['3'])
-self.expect('frame variable y', matching=False, substrs=["'B'"])
-self.expect('frame variable z', matching=False, substrs=['14'])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D116863: [lldb] Remove anon struct from frame-var-anon-unions test

2022-01-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 398348.
kastiglione added a comment.

clarify commit message


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116863

Files:
  
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
  lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp


Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
@@ -3,11 +3,6 @@
 int i;
 char c;
   };
-  struct {
-int x;
-char y;
-short z;
-  } s{3,'B',14};
   i = 0xFF00;
   c = 'A';
   return c; // break here
Index: 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
===
--- 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -29,7 +29,3 @@
 self.expect('frame variable -f x i', substrs=['4100'])
 
 self.expect('frame variable c', substrs=["'A"])
-
-self.expect('frame variable x', matching=False, substrs=['3'])
-self.expect('frame variable y', matching=False, substrs=["'B'"])
-self.expect('frame variable z', matching=False, substrs=['14'])


Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
@@ -3,11 +3,6 @@
 int i;
 char c;
   };
-  struct {
-int x;
-char y;
-short z;
-  } s{3,'B',14};
   i = 0xFF00;
   c = 'A';
   return c; // break here
Index: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -29,7 +29,3 @@
 self.expect('frame variable -f x i', substrs=['4100'])
 
 self.expect('frame variable c', substrs=["'A"])
-
-self.expect('frame variable x', matching=False, substrs=['3'])
-self.expect('frame variable y', matching=False, substrs=["'B'"])
-self.expect('frame variable z', matching=False, substrs=['14'])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D116863: [lldb] Remove anon struct from frame-var-anon-unions test

2022-01-08 Thread Dave Lee via Phabricator via lldb-commits
kastiglione updated this revision to Diff 398349.
kastiglione added a comment.

once more


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116863

Files:
  
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
  lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp


Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
@@ -3,11 +3,6 @@
 int i;
 char c;
   };
-  struct {
-int x;
-char y;
-short z;
-  } s{3,'B',14};
   i = 0xFF00;
   c = 'A';
   return c; // break here
Index: 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
===
--- 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ 
lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -29,7 +29,3 @@
 self.expect('frame variable -f x i', substrs=['4100'])
 
 self.expect('frame variable c', substrs=["'A"])
-
-self.expect('frame variable x', matching=False, substrs=['3'])
-self.expect('frame variable y', matching=False, substrs=["'B'"])
-self.expect('frame variable z', matching=False, substrs=['14'])


Index: lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/main.cpp
@@ -3,11 +3,6 @@
 int i;
 char c;
   };
-  struct {
-int x;
-char y;
-short z;
-  } s{3,'B',14};
   i = 0xFF00;
   c = 'A';
   return c; // break here
Index: lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
===
--- lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ lldb/test/API/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -29,7 +29,3 @@
 self.expect('frame variable -f x i', substrs=['4100'])
 
 self.expect('frame variable c', substrs=["'A"])
-
-self.expect('frame variable x', matching=False, substrs=['3'])
-self.expect('frame variable y', matching=False, substrs=["'B'"])
-self.expect('frame variable z', matching=False, substrs=['14'])
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 51fd157 - Remove duplicate forward declarations (NFC)

2022-01-08 Thread Kazu Hirata via lldb-commits

Author: Kazu Hirata
Date: 2022-01-08T11:56:42-08:00
New Revision: 51fd157635e11f7024dedf1d3a2a4c173f718b76

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

LOG: Remove duplicate forward declarations (NFC)

Added: 


Modified: 
lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
mlir/include/mlir/Dialect/SCF/Transforms.h

Removed: 




diff  --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h 
b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
index 1b382e5263c12..edbdd9ee290bb 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
@@ -25,7 +25,6 @@ namespace llvm {
 namespace pdb {
 class DbiStream;
 class TpiStream;
-class TpiStream;
 class InfoStream;
 class PublicsStream;
 class GlobalsStream;

diff  --git a/mlir/include/mlir/Dialect/SCF/Transforms.h 
b/mlir/include/mlir/Dialect/SCF/Transforms.h
index 9efbf83a2a112..8286d70c6f9a8 100644
--- a/mlir/include/mlir/Dialect/SCF/Transforms.h
+++ b/mlir/include/mlir/Dialect/SCF/Transforms.h
@@ -37,7 +37,6 @@ namespace scf {
 class IfOp;
 class ForOp;
 class ParallelOp;
-class ForOp;
 
 /// Fuses all adjacent scf.parallel operations with identical bounds and step
 /// into one scf.parallel operations. Uses a naive aliasing and dependency



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