[Lldb-commits] [lldb] Revert "[lldb] Fix crash missing MSInheritanceAttr on CXXRecordDecl with DWARF on Windows" (PR #113498)

Shubham Sandeep Rastogi via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 23 14:31:09 PDT 2024


https://github.com/rastogishubham created https://github.com/llvm/llvm-project/pull/113498

Reverts llvm/llvm-project#112928

This is because it broke greendragon: SymbolFile/DWARF/x86/member-pointers.cpp

>From 565b370162888c91e82bd5c9a8787bbc4942219c Mon Sep 17 00:00:00 2001
From: Shubham Sandeep Rastogi <shubhamrastogi3111995 at gmail.com>
Date: Wed, 23 Oct 2024 14:30:35 -0700
Subject: [PATCH] =?UTF-8?q?Revert=20"[lldb]=20Fix=20crash=20missing=20MSIn?=
 =?UTF-8?q?heritanceAttr=20with=20DWARF=20on=20Windows=20(#11=E2=80=A6"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit 699ce16b6284377e0cd9969b9f95e7367632a622.
---
 .../TypeSystem/Clang/TypeSystemClang.cpp      |  3 ---
 .../SymbolFile/DWARF/x86/member-pointers.cpp  | 24 -------------------
 2 files changed, 27 deletions(-)
 delete mode 100644 lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp

diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
index f5063175d6e070..a57cd8efce8a11 100644
--- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -2771,9 +2771,6 @@ static bool GetCompleteQualType(clang::ASTContext *ast,
         ast, llvm::cast<clang::AttributedType>(qual_type)->getModifiedType(),
         allow_completion);
 
-  case clang::Type::MemberPointer:
-    return !qual_type.getTypePtr()->isIncompleteType();
-
   default:
     break;
   }
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp
deleted file mode 100644
index 817833d4fa7515..00000000000000
--- a/lldb/test/Shell/SymbolFile/DWARF/x86/member-pointers.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// REQUIRES: lld
-
-// Itanium ABI:
-// RUN: %clang --target=x86_64-pc-linux -gdwarf -c -o %t_linux.o %s
-// RUN: %lldb -f %t_linux.o -b -o "target variable mp" | FileCheck %s
-//
-// CHECK: (char SI::*) mp = 0x0000000000000000
-
-// Microsoft ABI:
-// RUN: %clang_cl --target=x86_64-windows-msvc -c -gdwarf %s -o %t_win.obj
-// RUN: lld-link /out:%t_win.exe %t_win.obj /nodefaultlib /entry:main /debug
-// RUN: %lldb -f %t_win.exe -b -o "target variable mp" | FileCheck --check-prefix=CHECK-MSVC %s
-//
-// DWARF has no representation of MSInheritanceAttr, so we cannot determine the size
-// of member-pointers yet. For the moment, make sure we don't crash on such variables.
-// CHECK-MSVC: error: Unable to determine byte size.
-
-struct SI {
-  char si;
-};
-
-char SI::*mp = &SI::si;
-
-int main() { return 0; }



More information about the lldb-commits mailing list