Skip to content

Commit 0e0a166

Browse files
committed
Revert unintentional diff from cd826d6
This is part of a forthcoming fix for issues observed in #91310, and was unintentionally committed as part of the VTT type changes revert
1 parent dd17cf4 commit 0e0a166

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

+3-12
Original file line numberDiff line numberDiff line change
@@ -5837,24 +5837,15 @@ void CodeGenModule::EmitExternalVarDeclaration(const VarDecl *D) {
58375837
}
58385838
}
58395839

5840-
static GlobalDecl getBaseVariantGlobalDecl(const FunctionDecl *FD) {
5841-
if (auto const *CD = dyn_cast<const CXXConstructorDecl>(FD))
5842-
return GlobalDecl(CD, CXXCtorType::Ctor_Base);
5843-
else if (auto const *DD = dyn_cast<const CXXDestructorDecl>(FD))
5844-
return GlobalDecl(DD, CXXDtorType::Dtor_Base);
5845-
return GlobalDecl(FD);
5846-
}
5847-
58485840
void CodeGenModule::EmitExternalFunctionDeclaration(const FunctionDecl *FD) {
58495841
if (CGDebugInfo *DI = getModuleDebugInfo())
58505842
if (getCodeGenOpts().hasReducedDebugInfo()) {
5851-
GlobalDecl GD = getBaseVariantGlobalDecl(FD);
58525843
auto *Ty = getTypes().ConvertType(FD->getType());
5853-
StringRef MangledName = getMangledName(GD);
5844+
StringRef MangledName = getMangledName(FD);
58545845
auto *Fn = cast<llvm::Function>(
5855-
GetOrCreateLLVMFunction(MangledName, Ty, GD, /* ForVTable */ false));
5846+
GetOrCreateLLVMFunction(MangledName, Ty, FD, /* ForVTable */ false));
58565847
if (!Fn->getSubprogram())
5857-
DI->EmitFunctionDecl(GD, FD->getLocation(), FD->getType(), Fn);
5848+
DI->EmitFunctionDecl(FD, FD->getLocation(), FD->getType(), Fn);
58585849
}
58595850
}
58605851

0 commit comments

Comments
 (0)