@@ -2021,28 +2021,10 @@ llvm::DISubroutineType *CGDebugInfo::getOrCreateInstanceMethodType(
2021
2021
// ThisPtr may be null if the member function has an explicit 'this'
2022
2022
// parameter.
2023
2023
if (!ThisPtr.isNull ()) {
2024
- const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl ();
2025
- if (isa<ClassTemplateSpecializationDecl>(RD)) {
2026
- // Create pointer type directly in this case.
2027
- const PointerType *ThisPtrTy = cast<PointerType>(ThisPtr);
2028
- uint64_t Size = CGM.getContext ().getTypeSize (ThisPtrTy);
2029
- auto Align = getTypeAlignIfRequired (ThisPtrTy, CGM.getContext ());
2030
- llvm::DIType *PointeeType =
2031
- getOrCreateType (ThisPtrTy->getPointeeType (), Unit);
2032
- llvm::DIType *ThisPtrType =
2033
- DBuilder.createPointerType (PointeeType, Size, Align);
2034
- TypeCache[ThisPtr.getAsOpaquePtr ()].reset (ThisPtrType);
2035
- // TODO: This and the artificial type below are misleading, the
2036
- // types aren't artificial the argument is, but the current
2037
- // metadata doesn't represent that.
2038
- ThisPtrType = DBuilder.createObjectPointerType (ThisPtrType);
2039
- Elts.push_back (ThisPtrType);
2040
- } else {
2041
- llvm::DIType *ThisPtrType = getOrCreateType (ThisPtr, Unit);
2042
- TypeCache[ThisPtr.getAsOpaquePtr ()].reset (ThisPtrType);
2043
- ThisPtrType = DBuilder.createObjectPointerType (ThisPtrType);
2044
- Elts.push_back (ThisPtrType);
2045
- }
2024
+ llvm::DIType *ThisPtrType = getOrCreateType (ThisPtr, Unit);
2025
+ TypeCache[ThisPtr.getAsOpaquePtr ()].reset (ThisPtrType);
2026
+ ThisPtrType = DBuilder.createObjectPointerType (ThisPtrType);
2027
+ Elts.push_back (ThisPtrType);
2046
2028
}
2047
2029
2048
2030
// Copy rest of the arguments.
0 commit comments