Skip to content

Commit

Permalink
CGDebugInfo: Delete unused parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Jan 11, 2021
1 parent 00f773c commit b88c8f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
11 changes: 4 additions & 7 deletions clang/lib/CodeGen/CGDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2109,8 +2109,7 @@ StringRef CGDebugInfo::getDynamicInitializerName(const VarDecl *VD,
}

void CGDebugInfo::CollectVTableInfo(const CXXRecordDecl *RD, llvm::DIFile *Unit,
SmallVectorImpl<llvm::Metadata *> &EltTys,
llvm::DICompositeType *RecordTy) {
SmallVectorImpl<llvm::Metadata *> &EltTys) {
// If this class is not dynamic then there is not any vtable info to collect.
if (!RD->isDynamicClass())
return;
Expand Down Expand Up @@ -2428,7 +2427,7 @@ llvm::DIType *CGDebugInfo::CreateTypeDefinition(const RecordType *Ty) {
const auto *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
if (CXXDecl) {
CollectCXXBases(CXXDecl, DefUnit, EltTys, FwdDecl);
CollectVTableInfo(CXXDecl, DefUnit, EltTys, FwdDecl);
CollectVTableInfo(CXXDecl, DefUnit, EltTys);
}

// Collect data fields (including static variables and any initializers).
Expand Down Expand Up @@ -3794,11 +3793,9 @@ llvm::DISubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
return cast<llvm::DISubroutineType>(getOrCreateType(FnType, F));
}

void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
void CGDebugInfo::emitFunctionStart(GlobalDecl GD, SourceLocation Loc,
SourceLocation ScopeLoc, QualType FnType,
llvm::Function *Fn, bool CurFuncIsThunk,
CGBuilderTy &Builder) {

llvm::Function *Fn, bool CurFuncIsThunk) {
StringRef Name;
StringRef LinkageName;

Expand Down
8 changes: 3 additions & 5 deletions clang/lib/CodeGen/CGDebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ class CGDebugInfo {
/// If the C++ class has vtable info then insert appropriate debug
/// info entry in EltTys vector.
void CollectVTableInfo(const CXXRecordDecl *Decl, llvm::DIFile *F,
SmallVectorImpl<llvm::Metadata *> &EltTys,
llvm::DICompositeType *RecordTy);
SmallVectorImpl<llvm::Metadata *> &EltTys);
/// @}

/// Create a new lexical block node and push it on the stack.
Expand Down Expand Up @@ -413,10 +412,9 @@ class CGDebugInfo {
/// start of a new function.
/// \param Loc The location of the function header.
/// \param ScopeLoc The location of the function body.
void EmitFunctionStart(GlobalDecl GD, SourceLocation Loc,
void emitFunctionStart(GlobalDecl GD, SourceLocation Loc,
SourceLocation ScopeLoc, QualType FnType,
llvm::Function *Fn, bool CurFnIsThunk,
CGBuilderTy &Builder);
llvm::Function *Fn, bool CurFnIsThunk);

/// Start a new scope for an inlined function.
void EmitInlineFunctionStart(CGBuilderTy &Builder, GlobalDecl GD);
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/CodeGen/CodeGenFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,7 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
ArgTypes.push_back(VD->getType());
QualType FnType = getContext().getFunctionType(
RetTy, ArgTypes, FunctionProtoType::ExtProtoInfo(CC));
DI->EmitFunctionStart(GD, Loc, StartLoc, FnType, CurFn, CurFuncIsThunk,
Builder);
DI->emitFunctionStart(GD, Loc, StartLoc, FnType, CurFn, CurFuncIsThunk);
}

if (ShouldInstrumentFunction()) {
Expand Down

0 comments on commit b88c8f1

Please sign in to comment.