mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 19:44:38 +08:00
PR4133: fix always_inline implementation to be consistent with gcc.
llvm-svn: 70786
This commit is contained in:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user