Don't suppress the emission of available_externally functions marked
with always_inline attribute. Thanks to Howard for the tip. llvm-svn: 108469
This commit is contained in:
@@ -816,7 +816,8 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
|
||||
if (const FunctionDecl *Function = dyn_cast<FunctionDecl>(D)) {
|
||||
// At -O0, don't generate IR for functions with available_externally
|
||||
// linkage.
|
||||
if (CodeGenOpts.OptimizationLevel == 0 &&
|
||||
if (CodeGenOpts.OptimizationLevel == 0 &&
|
||||
!Function->hasAttr<AlwaysInlineAttr>() &&
|
||||
getFunctionLinkage(Function)
|
||||
== llvm::Function::AvailableExternallyLinkage)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user