[Lldb-commits] [lldb] [llvm] Add AArch64 support to the premerge tests (PR #155274)

2025-08-30 Thread Tom Stellard via lldb-commits

https://github.com/tstellar updated 
https://github.com/llvm/llvm-project/pull/155274

>From 57697a66cfdddf2028c7260f1ce61ecacc550d00 Mon Sep 17 00:00:00 2001
From: Tom Stellard 
Date: Mon, 25 Aug 2025 17:15:36 +
Subject: [PATCH 01/55] Add AArch64 support to the premerge tests

---
 .github/workflows/premerge.yaml | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 9d925517a7211..6d83573702a79 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -28,7 +28,13 @@ jobs:
 if: >-
 github.repository_owner == 'llvm' &&
 (github.event_name != 'pull_request' || github.event.action != 
'closed')
-runs-on: llvm-premerge-linux-runners
+matrix:
+  runs-on:
+- llvm-premerge-linux-runners
+- depot-ubuntu-24.04-arm-64
+runs-on: ${{ matrix.runs-on }}
+container:
+  image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
"ghcr.io/$GITHUB_REPOSITORY_OWNER/arm64v8/ci-ubuntu-24.04-agent" ) || null }}
 steps:
   - name: Checkout LLVM
 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 
v5.0.0

>From 8ba375b2d80614f4a769af1b417bf21f1712786c Mon Sep 17 00:00:00 2001
From: Tom Stellard 
Date: Mon, 25 Aug 2025 17:20:38 +
Subject: [PATCH 02/55] Fix typo

---
 .github/workflows/premerge.yaml | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 6d83573702a79..f88dbc6143ab4 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -28,10 +28,11 @@ jobs:
 if: >-
 github.repository_owner == 'llvm' &&
 (github.event_name != 'pull_request' || github.event.action != 
'closed')
-matrix:
-  runs-on:
-- llvm-premerge-linux-runners
-- depot-ubuntu-24.04-arm-64
+strategy:
+  matrix:
+runs-on:
+  - llvm-premerge-linux-runners
+  - depot-ubuntu-24.04-arm-64
 runs-on: ${{ matrix.runs-on }}
 container:
   image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
"ghcr.io/$GITHUB_REPOSITORY_OWNER/arm64v8/ci-ubuntu-24.04-agent" ) || null }}

>From af39d1af7635196606ceaeff6a2cf1db72e142e4 Mon Sep 17 00:00:00 2001
From: Tom Stellard 
Date: Mon, 25 Aug 2025 17:21:51 +
Subject: [PATCH 03/55] Fix quotes

---
 .github/workflows/premerge.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index f88dbc6143ab4..914713bb4a352 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -35,7 +35,7 @@ jobs:
   - depot-ubuntu-24.04-arm-64
 runs-on: ${{ matrix.runs-on }}
 container:
-  image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
"ghcr.io/$GITHUB_REPOSITORY_OWNER/arm64v8/ci-ubuntu-24.04-agent" ) || null }}
+  image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
'ghcr.io/$GITHUB_REPOSITORY_OWNER/arm64v8/ci-ubuntu-24.04-agent' ) || null }}
 steps:
   - name: Checkout LLVM
 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 
v5.0.0

>From 0330faf41115cab59d8667dbe77bf9414ea3455c Mon Sep 17 00:00:00 2001
From: Tom Stellard 
Date: Mon, 25 Aug 2025 17:24:18 +
Subject: [PATCH 04/55] Fix container name

---
 .github/workflows/premerge.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 914713bb4a352..edb7248d792fe 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -35,7 +35,7 @@ jobs:
   - depot-ubuntu-24.04-arm-64
 runs-on: ${{ matrix.runs-on }}
 container:
-  image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
'ghcr.io/$GITHUB_REPOSITORY_OWNER/arm64v8/ci-ubuntu-24.04-agent' ) || null }}
+  image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
format('ghcr.io/{}/arm64v8/ci-ubuntu-24.04-agent',github.repository_owner) ) || 
null }}
 steps:
   - name: Checkout LLVM
 uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 
v5.0.0

>From 0492ee60484cd594f80b6cadcb7ebc5755b6710c Mon Sep 17 00:00:00 2001
From: Tom Stellard 
Date: Mon, 25 Aug 2025 17:29:25 +
Subject: [PATCH 05/55] Fix format string

---
 .github/workflows/premerge.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index edb7248d792fe..28d79518bc1df 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -35,7 +35,7 @@ jobs:
   - depot-ubuntu-24.04-arm-64
 runs-on: ${{ matrix.runs-on }}
 container:
-  image: ${{ (startsWith(matrix.runs-on, 'depot-ubuntu-24.04-arm') && 
format('ghcr.io/{}/arm64v8/ci-ub

[Lldb-commits] [lldb] [LLDB][NativePDB] Set IsDynmaicCXXType metadata for records (PR #155853)

2025-08-30 Thread via lldb-commits


@@ -118,7 +118,10 @@ loadMatchingPDBFile(std::string exe_path, 
llvm::BumpPtrAllocator &allocator) {
   // executable.
   if (!FileSystem::Instance().Exists(pdb_file)) {
 const auto exe_dir = FileSpec(exe_path).CopyByRemovingLastPathComponent();
-const auto pdb_name = FileSpec(pdb_file).GetFilename().GetCString();
+const auto pdb_path_style =
+FileSpec::GuessPathStyle(pdb_file).value_or(FileSpec::Style::native);
+const auto pdb_name =
+FileSpec(pdb_file, pdb_path_style).GetFilename().GetCString();

Nerixyz wrote:

This is required for the tests to run on non-Windows OSs. The executable 
contains the path to the PDB file. This is the absolute path as built on my 
machine. However, this is a Windows path with backslashes. `FileSpec` uses the 
native style as a default. On Windows, that works fine, but it breaks on other 
OSs.

https://github.com/llvm/llvm-project/pull/155853
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [lldb] Add SBFunction::GetBaseName() & SBSymbol::GetBaseName() (PR #155939)

2025-08-30 Thread Dmitry Vasilyev via lldb-commits

slydiman wrote:

@JDevlieghere 
```
 TEST 'lldb-api :: python_api/basename/TestGetBaseName.py' 
FAILED 
Script:
--
C:/Python312/python.exe 
C:/buildbot/as-builder-10/lldb-x86-64/llvm-project/lldb\test\API\dotest.py -u 
CXXFLAGS -u CFLAGS --env 
LLVM_LIBS_DIR=C:/buildbot/as-builder-10/lldb-x86-64/build/./lib --env 
LLVM_INCLUDE_DIR=C:/buildbot/as-builder-10/lldb-x86-64/build/include --env 
LLVM_TOOLS_DIR=C:/buildbot/as-builder-10/lldb-x86-64/build/./bin --arch x86_64 
--build-dir C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex 
--lldb-module-cache-dir 
C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-lldb\lldb-api
 --clang-module-cache-dir 
C:/buildbot/as-builder-10/lldb-x86-64/build/lldb-test-build.noindex/module-cache-clang\lldb-api
 --executable C:/buildbot/as-builder-10/lldb-x86-64/build/./bin/lldb.exe 
--compiler C:/buildbot/as-builder-10/lldb-x86-64/build/./bin/clang.exe 
--dsymutil C:/buildbot/as-builder-10/lldb-x86-64/build/./bin/dsymutil.exe 
--make C:/ninja/make.exe --llvm-tools-dir 
C:/buildbot/as-builder-10/lldb-x86-64/build/./bin --lldb-obj-root 
C:/buildbot/as-builder-10/lldb-x86-64/build/tools/lldb --lldb-libs-dir 
C:/buildbot/as-builder-10/lldb-x86-64/build/./lib --cmake-build-type Release 
--skip-category=lldb-dap 
C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\API\python_api\basename
 -p TestGetBaseName.py
--
Exit Code: 1
Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 
88d075197e04a290f5a2d01bacd600e2bf9b3bf9)
  clang revision 88d075197e04a290f5a2d01bacd600e2bf9b3bf9
  llvm revision 88d075197e04a290f5a2d01bacd600e2bf9b3bf9
Skipping the following test categories: ['lldb-dap', 'libc++', 'libstdcxx', 
'dwo', 'dsym', 'gmodules', 'debugserver', 'objc', 'fork', 'pexpect']
--
Command Output (stderr):
--
FAIL: LLDB (C:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe-x86_64) 
:: test (TestGetBaseName.GetBaseNameTestCase.test)
==
FAIL: test (TestGetBaseName.GetBaseNameTestCase.test)
   Test SBFunction.GetBaseName() and SBSymbol.GetBaseName()
--
Traceback (most recent call last):
  File 
"C:\buildbot\as-builder-10\lldb-x86-64\llvm-project\lldb\test\API\python_api\basename\TestGetBaseName.py",
 line 35, in test
self.assertEqual(function_basename, "templateFunc")
AssertionError: None != 'templateFunc'
Config=x86_64-C:\buildbot\as-builder-10\lldb-x86-64\build\bin\clang.exe
--
Ran 1 test in 3.932s
FAILED (failures=1)
--

```

https://github.com/llvm/llvm-project/pull/155939
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via lldb-commits

https://github.com/MacDue updated 
https://github.com/llvm/llvm-project/pull/144368

>From 2b50682f230efa03c3b9a1f5c5e48e708734bf4d Mon Sep 17 00:00:00 2001
From: Roman A <[email protected]>
Date: Mon, 16 Jun 2025 15:59:01 +0100
Subject: [PATCH] A couple of grammar fixes

---
 clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp | 2 +-
 clang/test/AST/HLSL/RootSignatures-AST.hlsl  | 2 +-
 clang/test/Modules/safe_buffers_optout.cpp   | 4 ++--
 lldb/include/lldb/Target/CoreFileMemoryRanges.h  | 2 +-
 llvm/include/llvm/Analysis/VectorUtils.h | 2 +-
 llvm/lib/IR/DebugInfo.cpp| 2 +-
 llvm/lib/Transforms/Utils/IRNormalizer.cpp   | 2 +-
 mlir/lib/Bindings/Python/IRAttributes.cpp| 2 +-
 mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir  | 2 +-
 mlir/tools/mlir-tblgen/EnumsGen.cpp  | 2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp 
b/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
index 30fcba367db67..85dc9eb71ab7e 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseUsingCheck.cpp
@@ -151,7 +151,7 @@ void UseUsingCheck::check(const MatchFinder::MatchResult 
&Result) {
 StringRef ExtraReference = "";
 if (MainTypeEndLoc.isValid() && TypeRange.fullyContains(MainTypeEndLoc)) {
   // Each type introduced in a typedef can specify being a reference or
-  // pointer type seperately, so we need to sigure out if the new 
using-decl
+  // pointer type separately, so we need to sigure out if the new 
using-decl
   // needs to be to a reference or pointer as well.
   const SourceLocation Tok = utils::lexer::findPreviousAnyTokenKind(
   MatchedDecl->getLocation(), SM, LO, tok::TokenKind::star,
diff --git a/clang/test/AST/HLSL/RootSignatures-AST.hlsl 
b/clang/test/AST/HLSL/RootSignatures-AST.hlsl
index c700174da764d..1a0f17757796c 100644
--- a/clang/test/AST/HLSL/RootSignatures-AST.hlsl
+++ b/clang/test/AST/HLSL/RootSignatures-AST.hlsl
@@ -61,7 +61,7 @@ void same_rs_string_main() {}
   "DescriptorTable(Sampler(s0, numDescriptors = 4, space = 1))"
 
 // Ensure that when we define a different type root signature that it creates
-// a seperate decl and identifier to reference
+// a separate decl and identifier to reference
 
 // CHECK: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit 
[[DIFF_RS_DECL:__hlsl_rootsig_decl_\d*]]
 // CHECK-SAME: RootElements{
diff --git a/clang/test/Modules/safe_buffers_optout.cpp 
b/clang/test/Modules/safe_buffers_optout.cpp
index 8c3d6a235d399..39020a48925e1 100644
--- a/clang/test/Modules/safe_buffers_optout.cpp
+++ b/clang/test/Modules/safe_buffers_optout.cpp
@@ -96,7 +96,7 @@ int textual(int *p) {
 // `safe_buffers_test_base`. (So the module dependencies form a DAG.)
 
 // No expected warnings from base.h, test_sub1, or test_sub2 because they are
-// in seperate modules, and the explicit commands that builds them have no
+// in separate modules, and the explicit commands that builds them have no
 // `-Wunsafe-buffer-usage`.
 
 int foo(int * p) {
@@ -122,7 +122,7 @@ int foo(int * p) {
 // `safe_buffers_test_base`. (So the module dependencies form a DAG.)
 
 // No expected warnings from base.h, test_sub1, or test_sub2 because they are
-// in seperate modules, and the explicit commands that builds them have no
+// in separate modules, and the explicit commands that builds them have no
 // `-Wunsafe-buffer-usage`.
 
 int foo(int * p) {
diff --git a/lldb/include/lldb/Target/CoreFileMemoryRanges.h 
b/lldb/include/lldb/Target/CoreFileMemoryRanges.h
index 78d01acca324e..ef56a02ddee27 100644
--- a/lldb/include/lldb/Target/CoreFileMemoryRanges.h
+++ b/lldb/include/lldb/Target/CoreFileMemoryRanges.h
@@ -50,7 +50,7 @@ class CoreFileMemoryRanges
CoreFileMemoryRange> {
 public:
   /// Finalize and merge all overlapping ranges in this collection. Ranges
-  /// will be seperated based on permissions.
+  /// will be separated based on permissions.
   Status FinalizeCoreFileSaveRanges();
 };
 } // namespace lldb_private
diff --git a/llvm/include/llvm/Analysis/VectorUtils.h 
b/llvm/include/llvm/Analysis/VectorUtils.h
index 53ba1e8f77791..4ef2ace34856a 100644
--- a/llvm/include/llvm/Analysis/VectorUtils.h
+++ b/llvm/include/llvm/Analysis/VectorUtils.h
@@ -144,7 +144,7 @@ LLVM_ABI bool isTriviallyVectorizable(Intrinsic::ID ID);
 /// Note: There are intrinsics where implementing vectorization for the
 /// intrinsic is redundant, but we want to implement scalarization of the
 /// vector. To prevent the requirement that an intrinsic also implements
-/// vectorization we provide this seperate function.
+/// vectorization we provide this separate function.
 LLVM_ABI bool isTriviallyScalarizable(Intrinsic::ID ID,
  

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via lldb-commits

https://github.com/MacDue approved this pull request.

LGTM, will merge if CI passes

https://github.com/llvm/llvm-project/pull/144368
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via lldb-commits

https://github.com/MacDue auto_merge_enabled 
https://github.com/llvm/llvm-project/pull/144368
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] [LLDB][NativePDB] Set IsDynmaicCXXType metadata for records (PR #155853)

2025-08-30 Thread via lldb-commits

https://github.com/Nerixyz updated 
https://github.com/llvm/llvm-project/pull/155853

>From 8505efc3d41de3b12a4ae63a70d50055a02f06fd Mon Sep 17 00:00:00 2001
From: Nerixyz 
Date: Thu, 28 Aug 2025 16:33:57 +0200
Subject: [PATCH 1/6] [LLDB][NativePDB] Set IsDynmaicCXXType metadata for
 records

---
 lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp | 1 -
 .../Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp| 7 ++-
 .../Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h  | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp 
b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
index 709281cb32709..d837eee854801 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -615,7 +615,6 @@ clang::QualType 
PdbAstBuilder::CreateRecordType(PdbTypeSymId id,
 
   ClangASTMetadata metadata;
   metadata.SetUserID(toOpaqueUid(id));
-  metadata.SetIsDynamicCXXType(false);
 
   CompilerType ct = m_clang.CreateRecordType(
   context, OptionalClangModuleID(), access, uname, 
llvm::to_underlying(ttk),
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp 
b/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
index 1c575e90bd72c..1a9d91f6d6467 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
@@ -110,9 +110,11 @@ void UdtRecordCompleter::AddMethod(llvm::StringRef name, 
TypeIndex type_idx,
   lldb::AccessType access_type = TranslateMemberAccess(access);
   bool is_artificial = (options & MethodOptions::CompilerGenerated) ==
MethodOptions::CompilerGenerated;
+  bool is_virtual = attrs.isVirtual();
+  m_any_virtual_method = m_any_virtual_method || is_virtual;
   m_ast_builder.clang().AddMethodToCXXRecordType(
   derived_opaque_ty, name.data(), /*asm_label=*/{}, method_ct, access_type,
-  attrs.isVirtual(), attrs.isStatic(), false, false, false, is_artificial);
+  is_virtual, attrs.isStatic(), false, false, false, is_artificial);
 
   m_cxx_record_map[derived_opaque_ty].insert({name, method_ct});
 }
@@ -336,6 +338,9 @@ void UdtRecordCompleter::complete() {
   if (auto *record_decl = llvm::dyn_cast(&m_tag_decl)) {
 m_ast_builder.GetClangASTImporter().SetRecordLayout(record_decl, m_layout);
   }
+
+  if (auto meta = m_ast_builder.clang().GetMetadata(&m_tag_decl))
+meta->SetIsDynamicCXXType(m_any_virtual_method);
 }
 
 uint64_t
diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h 
b/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h
index e6e91d0f2c3e4..08edcf39c4cd8 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h
@@ -59,6 +59,7 @@ class UdtRecordCompleter : public 
llvm::codeview::TypeVisitorCallbacks {
   llvm::DenseMap, 8>>
   &m_cxx_record_map;
+  bool m_any_virtual_method = false;
 
 public:
   UdtRecordCompleter(

>From f4a99888577d6bcafc5ae208f2f46b8d4be8910c Mon Sep 17 00:00:00 2001
From: Nerixyz 
Date: Fri, 29 Aug 2025 19:54:48 +0200
Subject: [PATCH 2/6] fix: set dynamic type based on vtable first

---
 .../SymbolFile/NativePDB/PdbAstBuilder.cpp   | 16 ++--
 .../Plugins/SymbolFile/NativePDB/PdbAstBuilder.h |  4 ++--
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp 
b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
index d837eee854801..fd88c77021ef0 100644
--- a/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ b/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -601,20 +601,26 @@ PdbAstBuilder::CreateModifierType(const ModifierRecord 
&modifier) {
 }
 
 clang::QualType PdbAstBuilder::CreateRecordType(PdbTypeSymId id,
-const TagRecord &record) {
+const CVTagRecord &record) {
   clang::DeclContext *context = nullptr;
   std::string uname;
-  std::tie(context, uname) = CreateDeclInfoForType(record, id.index);
+  std::tie(context, uname) = CreateDeclInfoForType(record.asTag(), id.index);
   if (!context)
 return {};
 
-  clang::TagTypeKind ttk = TranslateUdtKind(record);
+  clang::TagTypeKind ttk = TranslateUdtKind(record.asTag());
   lldb::AccessType access = (ttk == clang::TagTypeKind::Class)
 ? lldb::eAccessPrivate
 : lldb::eAccessPublic;
 
   ClangASTMetadata metadata;
   metadata.SetUserID(toOpaqueUid(id));
+  // If a class has a vtable, it is dynamic.
+  // Otherwise, we wait until the record is completed - it might have virtual
+  // bases.
+  if (record.contextKind() == CompilerContextKind::ClassOrStruct &&
+  !record.asClass().getVTableSh

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread Benjamin Maxwell via lldb-commits

https://github.com/MacDue closed 
https://github.com/llvm/llvm-project/pull/144368
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] 912ce26 - [NFC] Fix typos 'seperate' -> 'separate' (#144368)

2025-08-30 Thread via lldb-commits

Author: Roman
Date: 2025-08-30T13:41:25Z
New Revision: 912ce2631ff397660236a7dc35247f390b1d7818

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

LOG: [NFC] Fix typos 'seperate' -> 'separate' (#144368)

Correct few typos: 'seperate' -> 'separate' .

Added: 


Modified: 
clang/test/AST/HLSL/RootSignatures-AST.hlsl
clang/test/Modules/safe_buffers_optout.cpp
lldb/include/lldb/Target/CoreFileMemoryRanges.h
llvm/include/llvm/Analysis/VectorUtils.h
llvm/lib/IR/DebugInfo.cpp
llvm/lib/Transforms/Utils/IRNormalizer.cpp
mlir/lib/Bindings/Python/IRAttributes.cpp
mlir/test/Dialect/Vector/vector-reduce-to-contract.mlir
mlir/tools/mlir-tblgen/EnumsGen.cpp

Removed: 




diff  --git a/clang/test/AST/HLSL/RootSignatures-AST.hlsl 
b/clang/test/AST/HLSL/RootSignatures-AST.hlsl
index df06165f1f1f9..32da1f14853b0 100644
--- a/clang/test/AST/HLSL/RootSignatures-AST.hlsl
+++ b/clang/test/AST/HLSL/RootSignatures-AST.hlsl
@@ -115,7 +115,7 @@ void same_rs_string_main() {}
   "DescriptorTable(Sampler(s0, numDescriptors = 4, space = 1))"
 
 // Ensure that when we define a 
diff erent type root signature that it creates
-// a seperate decl and identifier to reference
+// a separate decl and identifier to reference
 
 // CHECK: -HLSLRootSignatureDecl 0x{{.*}} {{.*}} implicit 
[[DIFF_RS_DECL:__hlsl_rootsig_decl_\d*]]
 // CHECK-V1_0: version: 1.0,

diff  --git a/clang/test/Modules/safe_buffers_optout.cpp 
b/clang/test/Modules/safe_buffers_optout.cpp
index 8c3d6a235d399..39020a48925e1 100644
--- a/clang/test/Modules/safe_buffers_optout.cpp
+++ b/clang/test/Modules/safe_buffers_optout.cpp
@@ -96,7 +96,7 @@ int textual(int *p) {
 // `safe_buffers_test_base`. (So the module dependencies form a DAG.)
 
 // No expected warnings from base.h, test_sub1, or test_sub2 because they are
-// in seperate modules, and the explicit commands that builds them have no
+// in separate modules, and the explicit commands that builds them have no
 // `-Wunsafe-buffer-usage`.
 
 int foo(int * p) {
@@ -122,7 +122,7 @@ int foo(int * p) {
 // `safe_buffers_test_base`. (So the module dependencies form a DAG.)
 
 // No expected warnings from base.h, test_sub1, or test_sub2 because they are
-// in seperate modules, and the explicit commands that builds them have no
+// in separate modules, and the explicit commands that builds them have no
 // `-Wunsafe-buffer-usage`.
 
 int foo(int * p) {

diff  --git a/lldb/include/lldb/Target/CoreFileMemoryRanges.h 
b/lldb/include/lldb/Target/CoreFileMemoryRanges.h
index 78d01acca324e..ef56a02ddee27 100644
--- a/lldb/include/lldb/Target/CoreFileMemoryRanges.h
+++ b/lldb/include/lldb/Target/CoreFileMemoryRanges.h
@@ -50,7 +50,7 @@ class CoreFileMemoryRanges
CoreFileMemoryRange> {
 public:
   /// Finalize and merge all overlapping ranges in this collection. Ranges
-  /// will be seperated based on permissions.
+  /// will be separated based on permissions.
   Status FinalizeCoreFileSaveRanges();
 };
 } // namespace lldb_private

diff  --git a/llvm/include/llvm/Analysis/VectorUtils.h 
b/llvm/include/llvm/Analysis/VectorUtils.h
index 6781cd5c606e9..ce94906ee7c00 100644
--- a/llvm/include/llvm/Analysis/VectorUtils.h
+++ b/llvm/include/llvm/Analysis/VectorUtils.h
@@ -145,7 +145,7 @@ LLVM_ABI bool isTriviallyVectorizable(Intrinsic::ID ID);
 /// Note: There are intrinsics where implementing vectorization for the
 /// intrinsic is redundant, but we want to implement scalarization of the
 /// vector. To prevent the requirement that an intrinsic also implements
-/// vectorization we provide this seperate function.
+/// vectorization we provide this separate function.
 LLVM_ABI bool isTriviallyScalarizable(Intrinsic::ID ID,
   const TargetTransformInfo *TTI);
 

diff  --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 8e523bcf7960e..b468d929b0280 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -755,7 +755,7 @@ class DebugTypeInfoRemoval {
 
   return getReplacementMDNode(N);
 };
-// Seperate recursive doRemap and operator [] into 2 lines to avoid
+// Separate recursive doRemap and operator [] into 2 lines to avoid
 // out-of-order evaluations since both of them can access the same memory
 // location in map Replacements.
 auto Value = doRemap(N);

diff  --git a/llvm/lib/Transforms/Utils/IRNormalizer.cpp 
b/llvm/lib/Transforms/Utils/IRNormalizer.cpp
index ad91318ae474c..fefa49f68c8da 100644
--- a/llvm/lib/Transforms/Utils/IRNormalizer.cpp
+++ b/llvm/lib/Transforms/Utils/IRNormalizer.cpp
@@ -427,7 +427,7 @@ void IRNormalizer::reorderInstructions(Function &F) const {
   // Process the remaining instructions.
   //
   // TODO

[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread via lldb-commits

github-actions[bot] wrote:



@GameRoMan Congratulations on having your first Pull Request (PR) merged into 
the LLVM Project!

Your changes will be combined with recent changes from other authors, then 
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a 
problem with a build, you may receive a report in an email or a comment on this 
PR.

Please check whether problems have been caused by your change specifically, as 
the builds can include changes from many authors. It is not uncommon for your 
change to be included in a build that fails due to someone else's changes, or 
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail 
[here](https://llvm.org/docs/MyFirstTypoFix.html#myfirsttypofix-issues-after-landing-your-pr).

If your change does cause a problem, it may be reverted, or you can revert it 
yourself. This is a normal part of [LLVM 
development](https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy).
 You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are 
working as expected, well done!


https://github.com/llvm/llvm-project/pull/144368
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [mlir] [NFC] Fix typos 'seperate' -> 'separate' (PR #144368)

2025-08-30 Thread LLVM Continuous Integration via lldb-commits

llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` 
running on `systemz-1` while building `clang,lldb,llvm,mlir` at step 6 
"test-openmp".

Full details are available at: 
https://lab.llvm.org/buildbot/#/builders/88/builds/15575


Here is the relevant piece of the build log for the reference

```
Step 6 (test-openmp) failure: test (failure)
 TEST 'libomp :: tasking/issue-94260-2.c' FAILED 

Exit Code: -11

Command Output (stdout):
--
# RUN: at line 1
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/./bin/clang 
-fopenmp   -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
 -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test 
-L 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
  -fno-omit-frame-pointer -mbackchain -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/ompt
 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c
 -o 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
 -lm -latomic && 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# executed command: 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/./bin/clang 
-fopenmp -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
 -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test 
-L 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/src
 -fno-omit-frame-pointer -mbackchain -I 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/ompt
 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.src/openmp/runtime/test/tasking/issue-94260-2.c
 -o 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
 -lm -latomic
# executed command: 
/home/uweigand/sandbox/buildbot/openmp-s390x-linux/llvm.build/runtimes/runtimes-bins/openmp/runtime/test/tasking/Output/issue-94260-2.c.tmp
# note: command had no output on stdout or stderr
# error: command failed with exit status: -11

--




```



https://github.com/llvm/llvm-project/pull/144368
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] d39772c - [lldb] Refactor variable annotation logic in Disassembler::PrintInstructions (#156118)

2025-08-30 Thread via lldb-commits

Author: Abdullah Mohammad Amin
Date: 2025-08-30T13:17:05-07:00
New Revision: d39772cb053c194ef809f3ca765f37237c4e1956

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

LOG: [lldb] Refactor variable annotation logic in 
Disassembler::PrintInstructions (#156118)

This patch is a follow-up to
[#152887](https://github.com/llvm/llvm-project/pull/152887), addressing
review comments that came in after the original change was merged.

- Move `VarState` definition out of `PrintInstructions` into a private
helper, with member comments placed before fields.
- Introduce a `VariableAnnotator` helper class to encapsulate state and
logic for live variable tracking across instructions.
- Replace `seen_this_inst` flag with a map-diff approach: recompute the
current variable set per instruction and diff against the previous set.
- Use `nullptr` instead of an empty `ProcessSP` when calling
`ABI::FindPlugin`.
- Narrow `Block*` scope with `if (Block *B = ...)`.
- Set `DIDumpOptions::PrintRegisterOnly` directly from
`static_cast(abi_sp)`.
- Prefer `emplace_back` over `push_back` for event strings.
- General cleanup to match LLVM coding style and reviewer feedback.

This makes the annotation code easier to read and consistent with
LLVM/LLDB conventions while preserving functionality.

Added: 


Modified: 
lldb/include/lldb/Core/Disassembler.h
lldb/source/Core/Disassembler.cpp

Removed: 




diff  --git a/lldb/include/lldb/Core/Disassembler.h 
b/lldb/include/lldb/Core/Disassembler.h
index 6a21470b2472c..db186dd33d774 100644
--- a/lldb/include/lldb/Core/Disassembler.h
+++ b/lldb/include/lldb/Core/Disassembler.h
@@ -566,6 +566,26 @@ class Disassembler : public 
std::enable_shared_from_this,
   const Disassembler &operator=(const Disassembler &) = delete;
 };
 
+/// Tracks live variable annotations across instructions and produces
+/// per-instruction "events" like `name = RDI` or `name = `.
+class VariableAnnotator {
+  struct VarState {
+/// Display name.
+std::string name;
+/// Last printed location (empty means ).
+std::string last_loc;
+  };
+
+  // Live state from the previous instruction, keyed by Variable::GetID().
+  llvm::DenseMap Live_;
+
+public:
+  /// Compute annotation strings for a single instruction and update `Live_`.
+  /// Returns only the events that should be printed *at this instruction*.
+  std::vector annotate(Instruction &inst, Target &target,
+const lldb::ModuleSP &module_sp);
+};
+
 } // namespace lldb_private
 
 #endif // LLDB_CORE_DISASSEMBLER_H

diff  --git a/lldb/source/Core/Disassembler.cpp 
b/lldb/source/Core/Disassembler.cpp
index 9b0b604d6caa0..f2ed1f7395346 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -286,6 +286,127 @@ bool Disassembler::ElideMixedSourceAndDisassemblyLine(
   return false;
 }
 
+// For each instruction, this block attempts to resolve in-scope variables
+// and determine if the current PC falls within their
+// DWARF location entry. If so, it prints a simplified annotation using the
+// variable name and its resolved location (e.g., "var = reg; " ).
+//
+// Annotations are only included if the variable has a valid DWARF location
+// entry, and the location string is non-empty after filtering. Decoding
+// errors and DWARF opcodes are intentionally omitted to keep the output
+// concise and user-friendly.
+//
+// The goal is to give users helpful live variable hints alongside the
+// disassembled instruction stream, similar to how debug information
+// enhances source-level debugging.
+std::vector
+VariableAnnotator::annotate(Instruction &inst, Target &target,
+const lldb::ModuleSP &module_sp) {
+  std::vector events;
+
+  // If we lost module context, everything becomes .
+  if (!module_sp) {
+for (const auto &KV : Live_)
+  events.emplace_back(llvm::formatv("{0} = ", 
KV.second.name).str());
+Live_.clear();
+return events;
+  }
+
+  // Resolve function/block at this *file* address.
+  SymbolContext sc;
+  const Address &iaddr = inst.GetAddress();
+  const auto mask = eSymbolContextFunction | eSymbolContextBlock;
+  if (!module_sp->ResolveSymbolContextForAddress(iaddr, mask, sc) ||
+  !sc.function) {
+// No function context: everything dies here.
+for (const auto &KV : Live_)
+  events.emplace_back(llvm::formatv("{0} = ", 
KV.second.name).str());
+Live_.clear();
+return events;
+  }
+
+  // Collect in-scope variables for this instruction into Current.
+  VariableList var_list;
+  // Innermost block containing iaddr.
+  if (Block *B = sc.block) {
+auto filter = [](Variable *v) -> bool { return v && !v->IsArtificial(); };
+B->AppendVariables(/*can_create*/ true,
+

[Lldb-commits] [lldb] [lldb] Refactor variable annotation logic in Disassembler::PrintInstructions (PR #156118)

2025-08-30 Thread Jonas Devlieghere via lldb-commits

https://github.com/JDevlieghere closed 
https://github.com/llvm/llvm-project/pull/156118
___
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits