diff options
author | Reid Kleckner <rnk@google.com> | 2025-04-23 22:30:44 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2025-04-23 22:30:44 +0000 |
commit | 0e0a1665fa340b9f1934d12aff818064aaf289ef (patch) | |
tree | 5b1fd9dbd87fd77430eaed13b3a9599a75cc5359 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | dd17cf4480fc55c38813769a46fb2807397d8f72 (diff) | |
download | llvm-0e0a1665fa340b9f1934d12aff818064aaf289ef.zip llvm-0e0a1665fa340b9f1934d12aff818064aaf289ef.tar.gz llvm-0e0a1665fa340b9f1934d12aff818064aaf289ef.tar.bz2 |
Revert unintentional diff from cd826d6e840ed33ad88458c862da5f9fcc6e908c
This is part of a forthcoming fix for issues observed in #91310, and was
unintentionally committed as part of the VTT type changes revert
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index a073c5d..83d8d4f 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -5837,24 +5837,15 @@ void CodeGenModule::EmitExternalVarDeclaration(const VarDecl *D) { } } -static GlobalDecl getBaseVariantGlobalDecl(const FunctionDecl *FD) { - if (auto const *CD = dyn_cast<const CXXConstructorDecl>(FD)) - return GlobalDecl(CD, CXXCtorType::Ctor_Base); - else if (auto const *DD = dyn_cast<const CXXDestructorDecl>(FD)) - return GlobalDecl(DD, CXXDtorType::Dtor_Base); - return GlobalDecl(FD); -} - void CodeGenModule::EmitExternalFunctionDeclaration(const FunctionDecl *FD) { if (CGDebugInfo *DI = getModuleDebugInfo()) if (getCodeGenOpts().hasReducedDebugInfo()) { - GlobalDecl GD = getBaseVariantGlobalDecl(FD); auto *Ty = getTypes().ConvertType(FD->getType()); - StringRef MangledName = getMangledName(GD); + StringRef MangledName = getMangledName(FD); auto *Fn = cast<llvm::Function>( - GetOrCreateLLVMFunction(MangledName, Ty, GD, /* ForVTable */ false)); + GetOrCreateLLVMFunction(MangledName, Ty, FD, /* ForVTable */ false)); if (!Fn->getSubprogram()) - DI->EmitFunctionDecl(GD, FD->getLocation(), FD->getType(), Fn); + DI->EmitFunctionDecl(FD, FD->getLocation(), FD->getType(), Fn); } } |