@@ -5837,24 +5837,15 @@ void CodeGenModule::EmitExternalVarDeclaration(const VarDecl *D) {
5837
5837
}
5838
5838
}
5839
5839
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
-
5848
5840
void CodeGenModule::EmitExternalFunctionDeclaration (const FunctionDecl *FD) {
5849
5841
if (CGDebugInfo *DI = getModuleDebugInfo ())
5850
5842
if (getCodeGenOpts ().hasReducedDebugInfo ()) {
5851
- GlobalDecl GD = getBaseVariantGlobalDecl (FD);
5852
5843
auto *Ty = getTypes ().ConvertType (FD->getType ());
5853
- StringRef MangledName = getMangledName (GD );
5844
+ StringRef MangledName = getMangledName (FD );
5854
5845
auto *Fn = cast<llvm::Function>(
5855
- GetOrCreateLLVMFunction (MangledName, Ty, GD , /* ForVTable */ false ));
5846
+ GetOrCreateLLVMFunction (MangledName, Ty, FD , /* ForVTable */ false ));
5856
5847
if (!Fn->getSubprogram ())
5857
- DI->EmitFunctionDecl (GD , FD->getLocation (), FD->getType (), Fn);
5848
+ DI->EmitFunctionDecl (FD , FD->getLocation (), FD->getType (), Fn);
5858
5849
}
5859
5850
}
5860
5851
0 commit comments