PR4133: fix always_inline implementation to be consistent with gcc.

llvm-svn: 70786
This commit is contained in:
Eli Friedman 2009-05-03 18:13:43 +00:00
parent 1619a5041c
commit c0042d804c
2 changed files with 2 additions and 4 deletions

View File

@ -231,8 +231,7 @@ void CodeGenModule::EmitAnnotations() {
static CodeGenModule::GVALinkage
GetLinkageForFunction(const FunctionDecl *FD, const LangOptions &Features) {
// "static" and attr(always_inline) functions get internal linkage.
if (FD->getStorageClass() == FunctionDecl::Static ||
FD->hasAttr<AlwaysInlineAttr>())
if (FD->getStorageClass() == FunctionDecl::Static)
return CodeGenModule::GVA_Internal;
if (!FD->isInline())

View File

@ -24,8 +24,7 @@ void f6(signed short x) { }
void f7(unsigned short x) { }
// F8 is dead so it should not be emitted.
// RUN: not grep '@f8' %t &&
// RUN: grep 'define void @f8() nounwind alwaysinline' %t &&
void __attribute__((always_inline)) f8(void) { }
// RUN: grep 'call void @f9_t() noreturn' %t &&