Revert "Specify target triple in alwaysinline tests."
Revert "Always_inline codegen rewrite." Breaks gdb & lldb tests. Breaks on Fedora 22 x86_64. llvm-svn: 247491
This commit is contained in:
@@ -109,9 +109,6 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {
|
||||
D->getType()->getAs<FunctionType>()->getCallConv())
|
||||
return true;
|
||||
|
||||
if (BaseD->hasAttr<AlwaysInlineAttr>())
|
||||
return true;
|
||||
|
||||
return TryEmitDefinitionAsAlias(GlobalDecl(D, Dtor_Base),
|
||||
GlobalDecl(BaseD, Dtor_Base),
|
||||
false);
|
||||
@@ -164,7 +161,14 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
|
||||
|
||||
// Instead of creating as alias to a linkonce_odr, replace all of the uses
|
||||
// of the aliasee.
|
||||
if (llvm::GlobalValue::isDiscardableIfUnused(Linkage)) {
|
||||
if (llvm::GlobalValue::isDiscardableIfUnused(Linkage) &&
|
||||
(TargetLinkage != llvm::GlobalValue::AvailableExternallyLinkage ||
|
||||
!TargetDecl.getDecl()->hasAttr<AlwaysInlineAttr>())) {
|
||||
// FIXME: An extern template instantiation will create functions with
|
||||
// linkage "AvailableExternally". In libc++, some classes also define
|
||||
// members with attribute "AlwaysInline" and expect no reference to
|
||||
// be generated. It is desirable to reenable this optimisation after
|
||||
// corresponding LLVM changes.
|
||||
Replacements[MangledName] = Aliasee;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user