From 8997690ff1070e9ab4f9b7bf57f5ba45763a796c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 15 Jul 2010 22:58:18 +0000 Subject: Don't suppress the emission of available_externally functions marked with always_inline attribute. Thanks to Howard for the tip. llvm-svn: 108469 --- clang/lib/CodeGen/CodeGenModule.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index bf606a6..834f981 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -816,7 +816,8 @@ void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) { if (const FunctionDecl *Function = dyn_cast(D)) { // At -O0, don't generate IR for functions with available_externally // linkage. - if (CodeGenOpts.OptimizationLevel == 0 && + if (CodeGenOpts.OptimizationLevel == 0 && + !Function->hasAttr() && getFunctionLinkage(Function) == llvm::Function::AvailableExternallyLinkage) return; -- cgit v1.1