[PATCH] D134825: [clang] Add debug info in MicrosoftCXXABI::EmitVirtualMemPtrThunk()

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 22:09:32 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2f3d7c2cc770: [clang] Add debug info in MicrosoftCXXABI::EmitVirtualMemPtrThunk() (authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134825

Files:
  clang/lib/CodeGen/MicrosoftCXXABI.cpp
  clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp


Index: clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp
===================================================================
--- /dev/null
+++ clang/test/CodeGenCXX/microsoft-abi-member-pointers-debug-info.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++11 -debug-info-kind=line-tables-only -fno-rtti -emit-llvm %s -o - -triple=x86_64-pc-win32 -fms-extensions | FileCheck %s
+
+struct Task {
+  virtual void Run() = 0;
+};
+
+auto b = &Task::Run;
+
+// CHECK: define {{.*}}@"??_9Task@@$BA at AA"
+// CHECK-NOT: define
+// CHECK: musttail call {{.*}}, !dbg ![[DBG:[0-9]+]]
+
+// CHECK: ![[DBG]] = !DILocation(line: 4
+
Index: clang/lib/CodeGen/MicrosoftCXXABI.cpp
===================================================================
--- clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -2083,6 +2083,8 @@
   // Start defining the function.
   CGF.StartFunction(GlobalDecl(), FnInfo.getReturnType(), ThunkFn, FnInfo,
                     FunctionArgs, MD->getLocation(), SourceLocation());
+
+  ApplyDebugLocation AL(CGF, MD->getLocation());
   setCXXABIThisValue(CGF, loadIncomingCXXThis(CGF));
 
   // Load the vfptr and then callee from the vftable.  The callee should have


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134825.463759.patch
Type: text/x-patch
Size: 1223 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220929/53abee3a/attachment-0001.bin>


More information about the cfe-commits mailing list