forked from OSchip/llvm-project
PR4133: fix always_inline implementation to be consistent with gcc.
llvm-svn: 70786
This commit is contained in:
parent
1619a5041c
commit
c0042d804c
|
@ -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())
|
||||
|
|
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue