aeubanks created this revision. aeubanks added a reviewer: rnk. Herald added a project: All. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Fixes https://crbug.com/1355639 Repository: rG LLVM Github Monorepo 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,11 @@ +// RUN: %clang_cc1 -no-opaque-pointers -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: musttail call {{.*}}, !dbg ![[DBG:[0-9]+]] + +// CHECK: ![[DBG]] = !DILocation( \ No newline at end of file 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
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,11 @@ +// RUN: %clang_cc1 -no-opaque-pointers -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: musttail call {{.*}}, !dbg ![[DBG:[0-9]+]] + +// CHECK: ![[DBG]] = !DILocation( \ No newline at end of file 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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits