@@ -810,10 +810,6 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
810
810
return DBuilder.createBasicType (BTName, Size, Encoding);
811
811
}
812
812
813
- llvm::DIType *CGDebugInfo::CreateType (const AutoType *Ty) {
814
- return DBuilder.createUnspecifiedType (" auto" );
815
- }
816
-
817
813
llvm::DIType *CGDebugInfo::CreateType (const ComplexType *Ty) {
818
814
// Bit size and offset of the type.
819
815
llvm::dwarf::TypeKind Encoding = llvm::dwarf::DW_ATE_complex_float;
@@ -1461,31 +1457,26 @@ void CGDebugInfo::CollectRecordFields(
1461
1457
1462
1458
llvm::DISubroutineType *
1463
1459
CGDebugInfo::getOrCreateMethodType (const CXXMethodDecl *Method,
1464
- llvm::DIFile *Unit, bool decl ) {
1460
+ llvm::DIFile *Unit) {
1465
1461
const FunctionProtoType *Func = Method->getType ()->getAs <FunctionProtoType>();
1466
1462
if (Method->isStatic ())
1467
1463
return cast_or_null<llvm::DISubroutineType>(
1468
1464
getOrCreateType (QualType (Func, 0 ), Unit));
1469
- return getOrCreateInstanceMethodType (Method->getThisType (), Func, Unit, decl );
1465
+ return getOrCreateInstanceMethodType (Method->getThisType (), Func, Unit);
1470
1466
}
1471
1467
1472
- llvm::DISubroutineType *
1473
- CGDebugInfo::getOrCreateInstanceMethodType (QualType ThisPtr,
1474
- const FunctionProtoType *Func,
1475
- llvm::DIFile *Unit, bool decl) {
1468
+ llvm::DISubroutineType *CGDebugInfo::getOrCreateInstanceMethodType (
1469
+ QualType ThisPtr, const FunctionProtoType *Func, llvm::DIFile *Unit) {
1476
1470
// Add "this" pointer.
1477
1471
llvm::DITypeRefArray Args (
1478
1472
cast<llvm::DISubroutineType>(getOrCreateType (QualType (Func, 0 ), Unit))
1479
1473
->getTypeArray ());
1480
1474
assert (Args.size () && " Invalid number of arguments!" );
1481
1475
1482
1476
SmallVector<llvm::Metadata *, 16 > Elts;
1477
+
1483
1478
// First element is always return type. For 'void' functions it is NULL.
1484
- QualType temp = Func->getReturnType ();
1485
- if (temp->getTypeClass () == Type::Auto && decl)
1486
- Elts.push_back (CreateType (cast<AutoType>(temp)));
1487
- else
1488
- Elts.push_back (Args[0 ]);
1479
+ Elts.push_back (Args[0 ]);
1489
1480
1490
1481
// "this" pointer is always first argument.
1491
1482
const CXXRecordDecl *RD = ThisPtr->getPointeeCXXRecordDecl ();
@@ -1544,7 +1535,7 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction(
1544
1535
isa<CXXConstructorDecl>(Method) || isa<CXXDestructorDecl>(Method);
1545
1536
1546
1537
StringRef MethodName = getFunctionName (Method);
1547
- llvm::DISubroutineType *MethodTy = getOrCreateMethodType (Method, Unit, true );
1538
+ llvm::DISubroutineType *MethodTy = getOrCreateMethodType (Method, Unit);
1548
1539
1549
1540
// Since a single ctor/dtor corresponds to multiple functions, it doesn't
1550
1541
// make sense to give a single ctor/dtor a linkage name.
@@ -2763,7 +2754,7 @@ llvm::DIType *CGDebugInfo::CreateType(const MemberPointerType *Ty,
2763
2754
return DBuilder.createMemberPointerType (
2764
2755
getOrCreateInstanceMethodType (
2765
2756
CXXMethodDecl::getThisType (FPT, Ty->getMostRecentCXXRecordDecl ()),
2766
- FPT, U, false ),
2757
+ FPT, U),
2767
2758
ClassType, Size, /* Align=*/ 0 , Flags);
2768
2759
}
2769
2760
@@ -3538,7 +3529,7 @@ llvm::DISubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
3538
3529
return DBuilder.createSubroutineType (DBuilder.getOrCreateTypeArray (None));
3539
3530
3540
3531
if (const auto *Method = dyn_cast<CXXMethodDecl>(D))
3541
- return getOrCreateMethodType (Method, F, false );
3532
+ return getOrCreateMethodType (Method, F);
3542
3533
3543
3534
const auto *FTy = FnType->getAs <FunctionType>();
3544
3535
CallingConv CC = FTy ? FTy->getCallConv () : CallingConv::CC_C;
0 commit comments