Skip to content

Commit c44ecae

Browse files
smeenailanza
authored andcommitted
[CIR][CIRGen] Port 1d0bd8e (#983)
llvm/llvm-project@1d0bd8e moves a conditional from CodeGen to AST, and this follows suit for consistency. (Our support for the Microsoft ABI is NYI anyway; this is just to make things simpler to follow when matching up logic between CodeGen and CIRGen.)
1 parent c1811d9 commit c44ecae

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,16 +2130,6 @@ mlir::cir::GlobalLinkageKind CIRGenModule::getFunctionLinkage(GlobalDecl GD) {
21302130
if (const auto *Dtor = dyn_cast<CXXDestructorDecl>(D))
21312131
return getCXXABI().getCXXDestructorLinkage(Linkage, Dtor, GD.getDtorType());
21322132

2133-
if (isa<CXXConstructorDecl>(D) &&
2134-
cast<CXXConstructorDecl>(D)->isInheritingConstructor() &&
2135-
astCtx.getTargetInfo().getCXXABI().isMicrosoft()) {
2136-
// Just like in LLVM codegen:
2137-
// Our approach to inheriting constructors is fundamentally different from
2138-
// that used by the MS ABI, so keep our inheriting constructor thunks
2139-
// internal rather than trying to pick an unambiguous mangling for them.
2140-
return mlir::cir::GlobalLinkageKind::InternalLinkage;
2141-
}
2142-
21432133
return getCIRLinkageForDeclarator(D, Linkage, /*IsConstantVariable=*/false);
21442134
}
21452135

0 commit comments

Comments
 (0)