================
@@ -2021,28 +2021,10 @@ llvm::DISubroutineType 
*CGDebugInfo::getOrCreateInstanceMethodType(
   // ThisPtr may be null if the member function has an explicit 'this'
   // parameter.
   if (!ThisPtr.isNull()) {
-    const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl();
-    if (isa<ClassTemplateSpecializationDecl>(RD)) {
----------------
llvm-beanz wrote:

This code has been around in clang for _a long time_, and it was implemented 
back when LLVM's testing standards were not quite as high as they are today 
(https://github.com/llvm/llvm-project/commit/fa59ac363ef4747fdb142d993326c43d832629bb).

The test case that was introduced with the original code here is 
[here](https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGenCXX/debug-info-template-limit.cpp),
 and it generates identical IR with and without this PR.

It would be nice to have someone who understands C++ debug info well review 
this change as well, but it looks to me like the special handling here is 
vestigial and no longer needed.

@dwblaikie, @adrian-prantl, or @Michael137, can one of you take a look at this 
please?



https://github.com/llvm/llvm-project/pull/119041
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to