Add irgen support for the noinline attribute.
llvm-svn: 65056
This commit is contained in:
parent
880971241b
commit
f96954ca30
@ -339,6 +339,9 @@ void CodeGenModule::SetFunctionAttributesForDefinition(const Decl *D,
|
||||
|
||||
if (D->getAttr<AlwaysInlineAttr>())
|
||||
F->addFnAttr(llvm::Attribute::AlwaysInline);
|
||||
|
||||
if (D->getAttr<NoinlineAttr>())
|
||||
F->addFnAttr(llvm::Attribute::NoInline);
|
||||
}
|
||||
|
||||
void CodeGenModule::SetMethodAttributes(const ObjCMethodDecl *MD,
|
||||
|
||||
9
clang/test/CodeGen/attr-noinline.c
Normal file
9
clang/test/CodeGen/attr-noinline.c
Normal file
@ -0,0 +1,9 @@
|
||||
// RUN: clang -g -emit-llvm -o %t %s &&
|
||||
// RUN: grep 'noinline' %t
|
||||
|
||||
void t1() __attribute__((noinline));
|
||||
|
||||
void t1()
|
||||
{
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user